class DataProducer in GraphQL 8.4
Annotation for data producer plugins.
@codeCoverageIgnore
Hierarchy
- class \Drupal\Component\Annotation\Plugin implements AnnotationInterface
- class \Drupal\graphql\Annotation\DataProducer
Expanded class hierarchy of DataProducer
1 string reference to 'DataProducer'
65 classes are annotated with DataProducer
- CreateArticle in examples/
graphql_composable/ src/ Plugin/ GraphQL/ DataProducer/ CreateArticle.php - Creates a new article entity.
- CurrentUser in src/
Plugin/ GraphQL/ DataProducer/ User/ CurrentUser.php - Gets the current user.
- DefaultValue in src/
Plugin/ GraphQL/ DataProducer/ EntityDefinition/ Fields/ DefaultValue.php - Retrieves the "default_value" property from a given field definition.
- Description in src/
Plugin/ GraphQL/ DataProducer/ EntityDefinition/ Fields/ Description.php - Retrieves the "description" from a given field definition.
- EntityAccess in src/
Plugin/ GraphQL/ DataProducer/ Entity/ EntityAccess.php - Returns whether the given user has access to the entity.
File
- src/
Annotation/ DataProducer.php, line 14
Namespace
Drupal\graphql\AnnotationView source
class DataProducer extends Plugin {
/**
* The plugin ID.
*
* @var string
*/
public $id;
/**
* The component name.
*
* @var string
*/
public $name;
/**
* The component description.
*
* @var string
*/
public $description = '';
/**
* DataProducer constructor.
*
* @param array $values
* The plugin annotation values.
*
* @throws \Doctrine\Common\Annotations\AnnotationException
* In case of missing required annotation values.
*/
public function __construct(array $values) {
if (!array_key_exists('id', $values) || !$values['id']) {
throw new AnnotationException('The plugin is missing an "id" property.');
}
parent::__construct($values);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DataProducer:: |
public | property | The component description. | |
DataProducer:: |
public | property | The plugin ID. | |
DataProducer:: |
public | property | The component name. | |
DataProducer:: |
public | function |
DataProducer constructor. Overrides Plugin:: |
|
Plugin:: |
protected | property | The plugin definition read from the class annotation. | 1 |
Plugin:: |
public | function |
Gets the value of an annotation. Overrides AnnotationInterface:: |
5 |
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:: |