You are here

trait DescribablePluginTrait in GraphQL 8.3

Hierarchy

9 files declare their use of DescribablePluginTrait
EnumPluginBase.php in src/Plugin/GraphQL/Enums/EnumPluginBase.php
FieldPluginBase.php in src/Plugin/GraphQL/Fields/FieldPluginBase.php
InputTypePluginBase.php in src/Plugin/GraphQL/InputTypes/InputTypePluginBase.php
InterfacePluginBase.php in src/Plugin/GraphQL/Interfaces/InterfacePluginBase.php
MutationPluginBase.php in src/Plugin/GraphQL/Mutations/MutationPluginBase.php

... See full list

File

src/Plugin/GraphQL/Traits/DescribablePluginTrait.php, line 5

Namespace

Drupal\graphql\Plugin\GraphQL\Traits
View source
trait DescribablePluginTrait {

  /**
   * @param $definition
   *
   * @return null|string
   */
  protected function buildDescription($definition) {
    if (!empty($definition['description'])) {
      return (string) $definition['description'];
    }
    return NULL;
  }

}

Members