class ArticleResponse in GraphQL 8.4
Same name in this branch
- 8.4 examples/graphql_composable/src/GraphQL/Response/ArticleResponse.php \Drupal\graphql_composable\GraphQL\Response\ArticleResponse
- 8.4 examples/graphql_composable/src/Wrappers/Response/ArticleResponse.php \Drupal\graphql_composable\Wrappers\Response\ArticleResponse
Type of response used when an article is returned.
Hierarchy
- class \Drupal\graphql\GraphQL\Response\Response implements ResponseInterface
- class \Drupal\graphql_composable\GraphQL\Response\ArticleResponse
Expanded class hierarchy of ArticleResponse
2 files declare their use of ArticleResponse
- ComposableSchemaExampleExtension.php in examples/
graphql_composable/ src/ Plugin/ GraphQL/ SchemaExtension/ ComposableSchemaExampleExtension.php - CreateArticle.php in examples/
graphql_composable/ src/ Plugin/ GraphQL/ DataProducer/ CreateArticle.php
2 string references to 'ArticleResponse'
- ComposableSchemaExampleExtension::registerResolvers in examples/
graphql_composable/ src/ Plugin/ GraphQL/ SchemaExtension/ ComposableSchemaExampleExtension.php - Registers type and field resolvers in the shared registry.
- ComposableSchemaExampleExtension::resolveResponse in examples/
graphql_composable/ src/ Plugin/ GraphQL/ SchemaExtension/ ComposableSchemaExampleExtension.php - Resolves the response type.
File
- examples/
graphql_composable/ src/ GraphQL/ Response/ ArticleResponse.php, line 11
Namespace
Drupal\graphql_composable\GraphQL\ResponseView source
class ArticleResponse extends Response {
/**
* The article to be served.
*
* @var \Drupal\Core\Entity\EntityInterface|null
*/
protected $article;
/**
* Sets the content.
*
* @param \Drupal\Core\Entity\EntityInterface|null $article
* The article to be served.
*/
public function setArticle(?EntityInterface $article) : void {
$this->article = $article;
}
/**
* Gets the article to be served.
*
* @return \Drupal\Core\Entity\EntityInterface|null
* The article to be served.
*/
public function article() : ?EntityInterface {
return $this->article;
}
}
Members
Name![]() |
Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ArticleResponse:: |
protected | property | The article to be served. | |
ArticleResponse:: |
public | function | Gets the article to be served. | |
ArticleResponse:: |
public | function | Sets the content. | |
Response:: |
protected | property | List of violations. | |
Response:: |
public | function |
Adds the violation. Overrides ResponseInterface:: |
|
Response:: |
public | function |
Adds multiple violations. Overrides ResponseInterface:: |
|
Response:: |
public | function |
Gets the violations. Overrides ResponseInterface:: |
|
Response:: |
public | function |
Adds the violations from another response to this response. Overrides ResponseInterface:: |