You are here

function hook_flexiform_wrapper_alter in Flexiform 7

Alter the form wrapper for a Flexiform.

Parameters

callable $wrapper: The form wrapper callback.

FlexiformDisplayInterface $display: The display being built.

array $context: The context in which the form is being built.

1 function implements hook_flexiform_wrapper_alter()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

flexiform_multistep_flexiform_wrapper_alter in flexiform_multistep/flexiform_multistep.module
Implements hook_flexiform_wrapper_alter().
2 invocations of hook_flexiform_wrapper_alter()
FlexiformDisplayBase::build in includes/flexiform.display.inc
Build the form ready for rendering.
FlexiformDisplayCreateModal::build in includes/display/add_modal.display.inc
Build the form ready for rendering.

File

./flexiform.api.php, line 359
API documentation for Flexiform.

Code

function hook_flexiform_wrapper_alter($wrapper, FlexiformDisplayInterface $display, $context) {

  // Swap the wrapper to our custom one for a particular flexiform.
  if ($display
    ->getFlexiform()->form == 'my_form') {
    $wrapper = 'my_wrapper';
  }
}