Security update for Core, with self-updated composer
[yaffs-website] / web / core / lib / Drupal / Core / Entity / Annotation / EntityReferenceSelection.php
1 <?php
2
3 namespace Drupal\Core\Entity\Annotation;
4
5 use Drupal\Component\Annotation\Plugin;
6
7 /**
8  * Defines an EntityReferenceSelection plugin annotation object.
9  *
10  * Plugin Namespace: Plugin\EntityReferenceSelection
11  *
12  * For a working example, see
13  * \Drupal\comment\Plugin\EntityReferenceSelection\CommentSelection
14  *
15  * @see \Drupal\Core\Entity\EntityReferenceSelection\SelectionPluginManager
16  * @see \Drupal\Core\Entity\EntityReferenceSelection\SelectionInterface
17  * @see plugin_api
18  *
19  * @Annotation
20  */
21 class EntityReferenceSelection extends Plugin {
22
23   /**
24    * The plugin ID.
25    *
26    * @var string
27    */
28   public $id;
29
30   /**
31    * The human-readable name of the selection plugin.
32    *
33    * @ingroup plugin_translatable
34    *
35    * @var \Drupal\Core\Annotation\Translation
36    */
37   public $label;
38
39   /**
40    * The selection plugin group.
41    *
42    * This property is used to allow selection plugins to target a specific
43    * entity type while also inheriting the code of an existing selection plugin.
44    * For example, if we want to override the NodeSelection from the 'default'
45    * selection type, we can define the annotation of a new plugin as follows:
46    * @code
47    * id = "node_advanced",
48    * entity_types = {"node"},
49    * group = "default",
50    * weight = 5
51    * @endcode
52    *
53    * @var string
54    */
55   public $group;
56
57   /**
58    * An array of entity types that can be referenced by this plugin. Defaults to
59    * all entity types.
60    *
61    * @var array (optional)
62    */
63   public $entity_types = [];
64
65   /**
66    * The weight of the plugin in it's group.
67    *
68    * @var int
69    */
70   public $weight;
71
72 }