class EdgeCursor in Open Social 10.2.x
Same name and namespace in other branches
- 10.3.x modules/custom/social_graphql/src/Plugin/GraphQL/DataProducer/Edge/EdgeCursor.php \Drupal\social_graphql\Plugin\GraphQL\DataProducer\Edge\EdgeCursor
- 10.0.x modules/custom/social_graphql/src/Plugin/GraphQL/DataProducer/Edge/EdgeCursor.php \Drupal\social_graphql\Plugin\GraphQL\DataProducer\Edge\EdgeCursor
- 10.1.x modules/custom/social_graphql/src/Plugin/GraphQL/DataProducer/Edge/EdgeCursor.php \Drupal\social_graphql\Plugin\GraphQL\DataProducer\Edge\EdgeCursor
Returns the cursor for an edge.
Plugin annotation
@DataProducer(
id = "edge_cursor",
name = @Translation("Edge cursor"),
description = @Translation("Returns the cursor of an edge."),
produces = @ContextDefinition("string",
label = @Translation("Cursor")
),
consumes = {
"edge" = @ContextDefinition("any",
label = @Translation("EdgeInterface")
)
}
)
Hierarchy
- class \Drupal\social_graphql\Plugin\GraphQL\DataProducer\Edge\EdgeCursor extends \Drupal\graphql\Plugin\GraphQL\DataProducer\DataProducerPluginBase implements \Drupal\graphql\Plugin\DataProducerPluginCachingInterface
Expanded class hierarchy of EdgeCursor
File
- modules/
custom/ social_graphql/ src/ Plugin/ GraphQL/ DataProducer/ Edge/ EdgeCursor.php, line 26
Namespace
Drupal\social_graphql\Plugin\GraphQL\DataProducer\EdgeView source
class EdgeCursor extends DataProducerPluginBase implements DataProducerPluginCachingInterface {
/**
* Resolves the value for this data producer.
*
* @param \Drupal\social_graphql\Wrappers\EdgeInterface $edge
* The edge to return the cursor for.
*
* @return mixed
* The cursor for this edge.
*/
public function resolve(EdgeInterface $edge) {
return $edge
->getCursor();
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
EdgeCursor:: |
public | function | Resolves the value for this data producer. |