file AlterInterface.php

Namespace

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

Interfaces

Name Description
AlterInterface Defines the interface for an object oriented alter.