You are here

public function FlexiformFormEntityManagerDefault::registerCallback in Flexiform 7

Register a Callback

Register callbacks to be run at certain times by the entity manager.

Parameters

string $type: The type of callback to fire, either 'post' or 'pre'

string $namespace: The namespace of the entity.

callable $callback: The callback to fire.

array $extra: Array of extra arguments to pass to the callback.

File

includes/flexiform.form_entity_manager.inc, line 382
Contains the default entity manager for flexiforms.

Class

FlexiformFormEntityManagerDefault
Class that manages entities in a flexiform.

Code

public function registerCallback($type, $namespace, $callback, $extra = array()) {
  $this->callbacks[$type][$namespace][] = array(
    'callback' => $callback,
    'extra_args' => $extra,
  );
}