Category: Drupal 8

Six months ago or so it clearly stated in the Drupal docs to NOT create D8 modules due to the API not being finished. But people were still developing and porting D8 modules. I decided to try my hand at it and had a working module complete after a month or so. When I finally got Git access 6 months later to push my changes to Fancy Login, It had stopped working on the latest D8 build. This article covers the updates I had to make since the D8 API had changed.

UPDATE: this article is quite old and D8 core is now complete.

1. Moved FancyLoginSettingsForm.php rom folder fancy_login/src to fancy_login/src/Form folder

2. In FancyLoginSettingsForm.php file changed translate functions t(). for example

t('Text !url.', array('!url' => 'background-

color')) to t('Text background-color', array('@url' =>

'http://themeshift.com'))

3. Moved the function user_login_block_ajax_callback from file FancyLoginSettingsForm.php to

fancy_login.module file.

4. Moved libraries such as

Drupal\Core\Ajax\AjaxResponse;

Drupal\lightbox_login\Ajax\lightboxLoginRefreshPageCommand;

Drupal\lightbox_login\Ajax\lightboxLoginRedirectCommand;

from FancyLogin_loginForm.php file to fancy_login.module file.

5. Deleted library

use Drupal\Core\Ajax\AppendCommand;

from FancyLogin_loginForm.php file.

6. Moved function ser_pass_ajax_callback from FancyLogin_passForm.php file to fancy_login.module

Contact

office: (212)-658-1447 | cell: (914)-715-8862 | alex@freeenergymedia.com

Name
Email
Message

Message sent, Thanks!
Error! Please validate your fields.
2017 FEM NYC (formerly Free Energy Media)