Version 1
[yaffs-website] / web / themes / contrib / bootstrap / src / Plugin / Alter / AlterInterface.php
1 <?php
2 /**
3  * @file
4  * Contains \Drupal\bootstrap\Plugin\Alter\AlterInterface.
5  */
6
7 namespace Drupal\bootstrap\Plugin\Alter;
8
9 /**
10  * Defines the interface for an object oriented alter.
11  *
12  * @ingroup plugins_alter
13  */
14 interface AlterInterface {
15
16   /**
17    * Alters data for a specific hook_TYPE_alter() implementation.
18    *
19    * @param mixed $data
20    *   The variable that will be passed to hook_TYPE_alter() implementations to
21    *   be altered. The type of this variable depends on the value of the $type
22    *   argument. For example, when altering a 'form', $data will be a structured
23    *   array. When altering a 'profile', $data will be an object.
24    * @param mixed $context1
25    *   (optional) An additional variable that is passed by reference.
26    * @param mixed $context2
27    *   (optional) An additional variable that is passed by reference. If more
28    *   context needs to be provided to implementations, then this should be an
29    *   associative array as described above.
30    */
31   public function alter(&$data, &$context1 = NULL, &$context2 = NULL);
32
33 }