Skip to content

Instantly share code, notes, and snippets.

@init90
Last active May 5, 2018 21:11
Show Gist options
  • Select an option

  • Save init90/50699bc25b27abb3f87fb5d0d7ff170c to your computer and use it in GitHub Desktop.

Select an option

Save init90/50699bc25b27abb3f87fb5d0d7ff170c to your computer and use it in GitHub Desktop.
drupal 7, change entity paths.
/**
* Implements hook_entity_info_alter().
*/
function cba_events_entity_info_alter(&$entity_info) {
// Update exam events path.
$entity_info['event']['bundles']['exam_event']['crud']['edit']['path'] = 'event/exam/%eckentity/edit';
$entity_info['event']['bundles']['exam_event']['crud']['delete']['path'] = 'event/exam/%eckentity/delete';
// Update default event path.
$entity_info['event']['bundles']['default']['crud']['add']['path'] = 'event/default/add';
$entity_info['event']['bundles']['default']['crud']['edit']['path'] = 'event/default/%eckentity/edit';
$entity_info['event']['bundles']['default']['crud']['delete']['path'] = 'event/default/%eckentity/delete';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment