public function PanelizerEntityDefault::hook_admin_paths in Panelizer 7.2
Same name and namespace in other branches
- 7.3 plugins/entity/PanelizerEntityDefault.class.php \PanelizerEntityDefault::hook_admin_paths()
Implements a delegated hook_menu.
Overrides PanelizerEntityInterface::hook_admin_paths
File
- plugins/
entity/ PanelizerEntityDefault.class.php, line 620 - Base class for the Panelizer Entity plugin.
Class
- PanelizerEntityDefault
- Base class for the Panelizer Entity plugin.
Code
public function hook_admin_paths(&$items) {
if (!empty($this->plugin['entity path'])) {
$bits = explode('/', $this->plugin['entity path']);
foreach ($bits as $count => $bit) {
if (strpos($bit, '%') === 0) {
$bits[$count] = '*';
}
}
$path = implode('/', $bits);
$items[$path . '/panelizer*'] = TRUE;
}
}