class ThunderBreadcrumbSchemaExtension in Thunder 6.2.x
The menu schema extension.
Plugin annotation
@SchemaExtension(
id = "thunder_breadcrumb",
name = "Breadcrumb",
description = "Adds the breadcrumb.",
schema = "thunder"
)
Hierarchy
- class \Drupal\thunder_gqls\Plugin\GraphQL\SchemaExtension\ThunderSchemaExtensionPluginBase extends \Drupal\graphql\Plugin\GraphQL\SchemaExtension\SdlSchemaExtensionPluginBase uses ResolverHelperTrait
- class \Drupal\thunder_gqls\Plugin\GraphQL\SchemaExtension\ThunderBreadcrumbSchemaExtension
Expanded class hierarchy of ThunderBreadcrumbSchemaExtension
File
- modules/
thunder_gqls/ src/ Plugin/ GraphQL/ SchemaExtension/ ThunderBreadcrumbSchemaExtension.php, line 17
Namespace
Drupal\thunder_gqls\Plugin\GraphQL\SchemaExtensionView source
class ThunderBreadcrumbSchemaExtension extends ThunderSchemaExtensionPluginBase {
/**
* {@inheritdoc}
*/
public function registerResolvers(ResolverRegistryInterface $registry) {
parent::registerResolvers($registry);
$this
->addFieldResolverIfNotExists('Query', 'breadcrumb', $this->builder
->produce('thunder_entity_sub_request')
->map('path', $this->builder
->fromArgument('path'))
->map('key', $this->builder
->fromValue('breadcrumb')));
}
}