Upgraded drupal core with security updates
[yaffs-website] / web / core / lib / Drupal / Core / Entity / EntityBundleListenerInterface.php
1 <?php
2
3 namespace Drupal\Core\Entity;
4
5 /**
6  * An interface for reacting to entity bundle creation and deletion.
7  *
8  * @todo Convert to Symfony events: https://www.drupal.org/node/2332935
9  */
10 interface EntityBundleListenerInterface {
11
12   /**
13    * Reacts to a bundle being created.
14    *
15    * @param string $bundle
16    *   The name of the bundle created.
17    * @param string $entity_type_id
18    *   The entity type to which the bundle is bound; e.g. 'node' or 'user'.
19    */
20   public function onBundleCreate($bundle, $entity_type_id);
21
22   /**
23    * Reacts to a bundle being deleted.
24    *
25    * This method runs before fields are deleted.
26    *
27    * @param string $bundle
28    *   The name of the bundle being deleted.
29    * @param string $entity_type_id
30    *   The entity type to which the bundle is bound; e.g. 'node' or 'user'.
31    */
32   public function onBundleDelete($bundle, $entity_type_id);
33
34 }