class FlexiformDisplayEditModal in Flexiform 7
Class for add page displays.
Hierarchy
- class \FlexiformDisplayBase implements FlexiformDisplayInterface
- class \FlexiformDisplayPageBase
- class \FlexiformDisplayCreateModal
- class \FlexiformDisplayEditModal
- class \FlexiformDisplayCreateModal
- class \FlexiformDisplayPageBase
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;
}
}