public function FlexiformDisplayCreateModal::build in Flexiform 7
Build the form ready for rendering.
Overrides FlexiformDisplayBase::build
File
- includes/
display/ add_modal.display.inc, line 85 - Define Display plugin for the add page.
Class
- FlexiformDisplayCreateModal
- Class for add page displays.
Code
public function build($context = array()) {
if (empty($context['js'])) {
return parent::build($context);
}
// Get the base entity ready.
module_load_include('inc', 'flexiform', 'includes/flexiform.flexiform');
$base_entity = $this
->getBaseEntity($context);
module_invoke_all('flexiform_prepare_base_entity', $base_entity, $this->flexiform, $this);
$wrapper = 'flexiform_modal_wrapper';
drupal_alter('flexiform_wrapper', $wrapper, $this, $context);
$args = isset($context['args']) ? $context['args'] : array();
array_unshift($args, get_class($this));
array_unshift($args, $base_entity);
array_unshift($args, $this->flexiform);
return call_user_func_array($wrapper, $args);
}