You are here

public function FlexiformDisplayBase::build in Flexiform 7

Build the form ready for rendering.

Overrides FlexiformDisplayInterface::build

1 call to FlexiformDisplayBase::build()
FlexiformDisplayCreateModal::build in includes/display/add_modal.display.inc
Build the form ready for rendering.
2 methods override FlexiformDisplayBase::build()
FlexiformDisplayCreateModal::build in includes/display/add_modal.display.inc
Build the form ready for rendering.
FlexiformDisplayNull::build in includes/display/null.display.inc
Build the form ready for rendering.

File

includes/flexiform.display.inc, line 141
Specify base display classes for flexiforms.

Class

FlexiformDisplayBase
Base class for all flexiform displays.

Code

public function build($context = array()) {
  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);

  // Allow other modules to change the form wrapper.
  $wrapper = 'flexiform_wrapper';
  drupal_alter('flexiform_wrapper', $wrapper, $this, $context);
  $args = isset($context['args']) ? $context['args'] : array();
  array_unshift($args, $base_entity);
  array_unshift($args, $this->flexiform);
  return call_user_func_array($wrapper, $args);
}