function public function AlterInterface::alter

8.x-3.x AlterInterface.php public AlterInterface::alter(&$data, &$context1 = NULL, &$context2 = NULL)

Alters data for a specific hook_TYPE_alter() implementation.

Parameters

mixed $data: The variable that will be passed to hook_TYPE_alter() implementations to be altered. The type of this variable depends on the value of the $type argument. For example, when altering a 'form', $data will be a structured array. When altering a 'profile', $data will be an object.

mixed $context1: (optional) An additional variable that is passed by reference.

mixed $context2: (optional) An additional variable that is passed by reference. If more context needs to be provided to implementations, then this should be an associative array as described above.

Class

AlterInterface
Defines the interface for an object oriented alter.

Namespace

Drupal\bootstrap\Plugin\Alter

Source src/Plugin/Alter/AlterInterface.php (line 27)

public function alter(&$data, &$context1 = NULL, &$context2 = NULL);