You are here

public function FlexiformDisplayCreateModal::hook_menu in Flexiform 7

Define the menu links

Overrides FlexiformDisplayPageBase::hook_menu

1 call to FlexiformDisplayCreateModal::hook_menu()
FlexiformDisplayEditModal::hook_menu in includes/display/edit_modal.display.inc
Define the menu links
1 method overrides FlexiformDisplayCreateModal::hook_menu()
FlexiformDisplayEditModal::hook_menu in includes/display/edit_modal.display.inc
Define the menu links

File

includes/display/add_modal.display.inc, line 12
Define Display plugin for the add page.

Class

FlexiformDisplayCreateModal
Class for add page displays.

Code

public function hook_menu() {
  $items = array();
  $path = 'flexiform/' . $this
    ->getFlexiform()->form . '/%ctools_js';
  $items[$path] = array(
    'title callback' => 'flexiform_page_title',
    'title arguments' => $this
      ->getMenuArguments(),
    'page callback' => 'flexiform_modal_page_wrapper',
    'page arguments' => $this
      ->getMenuArguments(),
    'access callback' => 'flexiform_modal_page_access',
    'access arguments' => $this
      ->getMenuArguments(),
    'theme callback' => 'ajax_base_page_theme',
    'file' => 'flexiform.pages.inc',
  );

  // Add the access settings.
  if (!empty($this->configuration['access']['permission'])) {
    $items[$path]['access callback'] = 'user_access';
    $items[$path]['access arguments'] = array(
      $this->configuration['access']['permission'],
    );
  }
  return $items;
}