class EntityReferenceSelection in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/lib/Drupal/Core/Entity/Annotation/EntityReferenceSelection.php \Drupal\Core\Entity\Annotation\EntityReferenceSelection
Defines an EntityReferenceSelection plugin annotation object.
Plugin Namespace: Plugin\EntityReferenceSelection
For a working example, see \Drupal\comment\Plugin\EntityReferenceSelection\CommentSelection
Hierarchy
- class \Drupal\Component\Annotation\Plugin implements AnnotationInterface
- class \Drupal\Core\Entity\Annotation\EntityReferenceSelection
Expanded class hierarchy of EntityReferenceSelection
See also
\Drupal\Core\Entity\EntityReferenceSelection\SelectionPluginManager
\Drupal\Core\Entity\EntityReferenceSelection\SelectionInterface
Related topics
8 classes are annotated with EntityReferenceSelection
- Broken in core/
lib/ Drupal/ Core/ Entity/ Plugin/ EntityReferenceSelection/ Broken.php - Defines a fallback plugin for missing entity_reference selection plugins.
- CommentSelection in core/
modules/ comment/ src/ Plugin/ EntityReferenceSelection/ CommentSelection.php - Provides specific access control for the comment entity type.
- DefaultSelection in core/
lib/ Drupal/ Core/ Entity/ Plugin/ EntityReferenceSelection/ DefaultSelection.php - Default plugin implementation of the Entity Reference Selection plugin.
- FileSelection in core/
modules/ file/ src/ Plugin/ EntityReferenceSelection/ FileSelection.php - Provides specific access control for the file entity type.
- NodeSelection in core/
modules/ node/ src/ Plugin/ EntityReferenceSelection/ NodeSelection.php - Provides specific access control for the node entity type.
File
- core/
lib/ Drupal/ Core/ Entity/ Annotation/ EntityReferenceSelection.php, line 26 - Contains \Drupal\Core\Entity\Annotation\EntityReferenceSelection.
Namespace
Drupal\Core\Entity\AnnotationView source
class EntityReferenceSelection extends Plugin {
/**
* The plugin ID.
*
* @var string
*/
public $id;
/**
* The human-readable name of the selection plugin.
*
* @ingroup plugin_translatable
*
* @var \Drupal\Core\Annotation\Translation
*/
public $label;
/**
* The selection plugin group.
*
* This property is used to allow selection plugins to target a specific
* entity type while also inheriting the code of an existing selection plugin.
* For example, if we want to override the NodeSelection from the 'default'
* selection type, we can define the annotation of a new plugin as follows:
* @code
* id = "node_advanced",
* entity_types = {"node"},
* group = "default",
* weight = 5
* @endcode
*
* @var string
*/
public $group;
/**
* An array of entity types that can be referenced by this plugin. Defaults to
* all entity types.
*
* @var array (optional)
*/
public $entity_types = array();
/**
* The weight of the plugin in it's group.
*
* @var int
*/
public $weight;
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
EntityReferenceSelection:: |
public | property | An array of entity types that can be referenced by this plugin. Defaults to all entity types. | |
EntityReferenceSelection:: |
public | property | The selection plugin group. | |
EntityReferenceSelection:: |
public | property | The plugin ID. | |
EntityReferenceSelection:: |
public | property | The human-readable name of the selection plugin. | |
EntityReferenceSelection:: |
public | property | The weight of the plugin in it's group. | |
Plugin:: |
protected | property | The plugin definition read from the class annotation. | 1 |
Plugin:: |
public | function |
Gets the value of an annotation. Overrides AnnotationInterface:: |
2 |
Plugin:: |
public | function |
Gets the class of the annotated class. Overrides AnnotationInterface:: |
|
Plugin:: |
public | function |
Gets the unique ID for this annotated class. Overrides AnnotationInterface:: |
|
Plugin:: |
public | function |
Gets the name of the provider of the annotated class. Overrides AnnotationInterface:: |
|
Plugin:: |
protected | function | Parses an annotation into its definition. | |
Plugin:: |
public | function |
Sets the class of the annotated class. Overrides AnnotationInterface:: |
|
Plugin:: |
public | function |
Sets the name of the provider of the annotated class. Overrides AnnotationInterface:: |
|
Plugin:: |
public | function | Constructs a Plugin object. | 1 |