hook_path_insert($path)
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
- Hooks
- Define functions that alter the behavior of Drupal core.
File
- core/modules/path/path.api.php, line 22
- Hooks provided by the Path module.
Code
1 2 3 4 5 6 7 8 | function hook_path_insert( $path ) { db_insert( 'mytable' ) ->fields( array ( 'alias' => $path [ 'alias' ], 'pid' => $path [ 'pid' ], )) ->execute(); } |
Please login to continue.