v1/vendor/chi-teck/drupal-code-generator/templates/hook/path_insert.twig

12 lines
235 B
Twig

/**
* Implements hook_path_insert().
*/
function {{ machine_name }}_path_insert($path) {
\Drupal::database()->insert('mytable')
->fields([
'alias' => $path['alias'],
'pid' => $path['pid'],
])
->execute();
}