url($name, $parameters = [], $options = [])
Example:
url('entity.node.canonical', {'node': 42})
Result:
ssh-copy-id root@IP |
Create tag
git tag -a v1.9.3 -m "v1.9.3"
Push tag
git push origin tag v1.9.3
Delete remote tag
If you want to remove the commit altogether (and every commit that came after that)
git reset --hard adca297de~ //(assuming the commit's hash is adca297de).
git push origin -f
There are two ways to discover the hook name of a specific component. With the hook name, you can locate its base template file.
First, if you already know the filename of the template, you can infer the hook name from that.
The typical pattern for naming template files is {hook}--{optional context}.html.twig
You can ignore the .html.twig
suffix. Which results in {hook}--{optional context}
<?php | |
namespace Drupal\modal_form_example\Form; | |
use Drupal\Core\Form\FormBase; | |
use Drupal\Core\Form\FormStateInterface; | |
use Drupal\Core\Ajax\AjaxResponse; | |
use Drupal\Core\Ajax\OpenModalDialogCommand; | |
use Drupal\Core\Ajax\ReplaceCommand; |
<?php | |
/** | |
* Implements hook_module_implements_alter(). | |
*/ | |
function YOURMODULENAME_module_implements_alter(&$implementations, $hook) { | |
// I want that my hook_form_alter will execute last | |
// Move our hook_form_alter() implementation to the end of the list. | |
$my_module = 'MYMODULENAME'; | |
if ($hook == 'form_alter') { |
<?php | |
// Podemos hacerlo en el hook_entity_presave(), ejemplo en un block. | |
/** | |
* Implements hook_entity_presave(). | |
*/ | |
function MODULO_NAME_block_content_presave(BlockContent $entity) { | |
$value_title = $entity->field_container_url->title; | |
if ($value_title != "") { |
The friendly.libraries.yml file will look like this:
friendly-greeting:
version: 1.0
license: GPL
js:
js/friendly-greeting.js: { }
dependencies:
- core/drupalSettings