public function FlexiformDisplayPageBase::hook_menu in Flexiform 7
Define the menu links
2 calls to FlexiformDisplayPageBase::hook_menu()
- FlexiformDisplayEditPage::hook_menu in includes/
display/ edit_page.display.inc - Define the menu links
- FlexiformDisplayPageBase::getPath in includes/
display/ page.display.inc - Get the path, if applicable, for the display.
2 methods override FlexiformDisplayPageBase::hook_menu()
- FlexiformDisplayCreateModal::hook_menu in includes/
display/ add_modal.display.inc - Define the menu links
- FlexiformDisplayEditPage::hook_menu in includes/
display/ edit_page.display.inc - Define the menu links
File
- includes/
display/ page.display.inc, line 15 - Base definition for pages.
Class
- FlexiformDisplayPageBase
- Base class for page displays.
Code
public function hook_menu() {
$items = array();
$items[$this->configuration['path']] = array(
'title callback' => 'flexiform_page_title',
'title arguments' => $this
->getMenuArguments(),
'page callback' => 'flexiform_page_wrapper',
'page arguments' => $this
->getMenuArguments(),
'access callback' => 'flexiform_page_access',
'access arguments' => $this
->getMenuArguments(),
'file' => 'flexiform.pages.inc',
'weight' => isset($this->configuration['weight']) ? $this->configuration['weight'] : 0,
);
// Add the menu name if we have one.
if (isset($this->configuration['menu_name'])) {
$items[$this->configuration['path']]['menu_name'] = $this->configuration['menu_name'];
}
// Add the type if we have one.
if (isset($this->configuration['type'])) {
$items[$this->configuration['path']]['type'] = $this->configuration['type'];
// @TODO: Deal properly with default local tasks.
}
// Add the access settings.
if (!empty($this->configuration['access']['permission'])) {
$items[$this->configuration['path']]['access callback'] = 'user_access';
$items[$this->configuration['path']]['access arguments'] = array(
$this->configuration['access']['permission'],
);
}
return $items;
}