This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body { | |
backround: #2B2B2B !important; | |
} | |
#page { | |
background: #2B2B2B; | |
} | |
body { | |
color: #A9B7C6; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
composer create-project drupal/recommended-project site_folder | |
drush site:install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function ($, Drupal, once) { | |
Drupal.behaviors.myModuleBehavior = { | |
attach: function (context, settings) { | |
once('myCustomBehavior', 'input.myCustomBehavior', context).forEach(function () { | |
// Apply the myCustomBehaviour effect to the elements only once. | |
}); | |
} | |
}; | |
})(jQuery, Drupal, once); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
foobar: | |
js: | |
js/foobar.js: {} | |
dependencies: | |
- core/drupal | |
- core/jquery | |
- core/once |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
foobar: | |
js: | |
js/foobar.js: {} | |
dependencies: | |
- core/drupal | |
- core/jquery | |
- core/once |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @file /modules/custom/drupalbook/src/Controller/FirstPageController.php | |
*/ | |
namespace Drupal\drupalbook\Controller; | |
/** | |
* Provides route responses for the DrupalBook module. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @file /modules/custom/drupalbook/src/Controller/FirstPageController.php | |
*/ | |
namespace Drupal\drupalbook\Controller; | |
/** | |
* Provides route responses for the DrupalBook module. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//modules/custom/drupalbook/src/Controller/DisplayNode.php | |
namespace Drupal\drupalbook\Controller; | |
use Drupal\Core\Access\AccessResult; | |
use Drupal\node\NodeInterface; | |
/** | |
* Provides route responses for the DrupalBook module. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// /modules/custom/drupalbook/src/Form/DrupalbookSettingsForm.php | |
namespace Drupal\drupalbook\Form; | |
use Drupal\Core\Form\ConfigFormBase; | |
use Drupal\Core\Form\FormStateInterface; | |
/** | |
* Configure example settings for this site. | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Implements hook_form_alter(). | |
*/ | |
function drupalbook_form_alter(&$form, \Drupal\Core\Form\FormStateInterface $form_state, $form_id) { | |
if ($form_id == 'drupalbook_admin_settings') { | |
$form['drupalbook_api_key']['#attributes']['placeholder'] = 'API key'; | |
$form['drupalbook_api_client_id']['#attributes']['placeholder'] = 'API client ID'; |
OlderNewer