You are here

class FlexiformDisplayEditModal in Flexiform 7

Class for add page displays.

Hierarchy

Expanded class hierarchy of FlexiformDisplayEditModal

3 string references to 'FlexiformDisplayEditModal'
flexiform_edit_modal_button_content_type_content_type in plugins/content_types/edit_modal_button.inc
Get one sub type of this flexiform edit pane.
flexiform_edit_modal_button_content_type_content_types in plugins/content_types/edit_modal_button.inc
Return all flexiform edit pane sub types
flexiform_views_data_alter in includes/views/flexiform.views.inc
Implements hook_views_data_alter().

File

includes/display/edit_modal.display.inc, line 10
Define Display plugin for the add page.

View source
class FlexiformDisplayEditModal extends FlexiformDisplayCreateModal {

  /**
   * {@inheritdoc}
   */
  public function hook_menu() {
    $items = parent::hook_menu();
    $items['flexiform/' . $this
      ->getFlexiform()->form . '/%ctools_js/%'] = $items['flexiform/' . $this
      ->getFlexiform()->form . '/%ctools_js'];
    return $items;
  }

  /**
   * {@inheritdoc}
   */
  protected function getMenuArguments() {
    $args = parent::getMenuArguments();
    array_pop($args);
    array_push($args, 3);
    return $args;
  }

  /**
   * {@inheritdoc}
   */
  public function getBaseEntity($context = array()) {
    $base_entity = entity_load_single($this
      ->getFlexiform()->base_entity, $context['base_entity_id']);

    //@todo: Check the entity is the right bundle.
    return $base_entity;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
FlexiformDisplayBase::$flexiform protected property The Flexiform the display is for.
FlexiformDisplayBase::access public function Check the access for this form display. Overrides FlexiformDisplayInterface::access 1
FlexiformDisplayBase::getFlexiform public function Retrieve the flexiform for this display. Overrides FlexiformDisplayInterface::getFlexiform
FlexiformDisplayBase::isEnabled public function Is this display enabled. 1
FlexiformDisplayBase::__construct public function
FlexiformDisplayCreateModal::build public function Build the form ready for rendering. Overrides FlexiformDisplayBase::build
FlexiformDisplayCreateModal::configForm public function Get config form. Overrides FlexiformDisplayPageBase::configForm
FlexiformDisplayCreateModal::title public function Get the title. Overrides FlexiformDisplayPageBase::title
FlexiformDisplayEditModal::getBaseEntity public function Get the base entity for a flexiform. Overrides FlexiformDisplayBase::getBaseEntity
FlexiformDisplayEditModal::getMenuArguments protected function Get the page/title arguments for hook_menu. Overrides FlexiformDisplayCreateModal::getMenuArguments
FlexiformDisplayEditModal::hook_menu public function Define the menu links Overrides FlexiformDisplayCreateModal::hook_menu
FlexiformDisplayPageBase::getPath public function Get the path, if applicable, for the display. Overrides FlexiformDisplayBase::getPath
FlexiformDisplayPageBase::getPermissionOptions protected function Get Permission Options.