You are here

function hook_path_insert in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/path/path.api.php \hook_path_insert()

Respond to a path being inserted.

Parameters

array $path: The array structure is identical to that of the return value of \Drupal\Core\Path\PathInterface::save().

See also

\Drupal\Core\Path\PathInterface::save()

Related topics

2 functions implement hook_path_insert()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

menu_link_content_path_insert in core/modules/menu_link_content/menu_link_content.module
Implements hook_path_insert().
system_path_insert in core/modules/system/system.module
Implements hook_path_insert().

File

core/modules/path/path.api.php, line 22
Hooks provided by the Path module.

Code

function hook_path_insert($path) {
  db_insert('mytable')
    ->fields(array(
    'alias' => $path['alias'],
    'pid' => $path['pid'],
  ))
    ->execute();
}