You are here

class AboutName in Open Social 10.3.x

Get the community about name.

Plugin annotation


@DataProducer(
  id = "about_name",
  name = @Translation("Community About Name"),
  description = @Translation("The the community about name."),
  produces = @ContextDefinition("string",
    label = @Translation("Community about name")
  ),
  consumes = {
    "communityAbout" = @ContextDefinition("any",
      label = @Translation("Community about"),
      required = TRUE
    )
  }
)

Hierarchy

  • class \Drupal\social_branding\Plugin\GraphQL\DataProducer\AboutName extends \Drupal\social_graphql\Plugin\GraphQL\DataProducer\Entity\EntityDataProducerPluginBase

Expanded class hierarchy of AboutName

File

modules/social_features/social_branding/src/Plugin/GraphQL/DataProducer/AboutName.php, line 26

Namespace

Drupal\social_branding\Plugin\GraphQL\DataProducer
View source
class AboutName extends EntityDataProducerPluginBase {

  /**
   * Returns the community about name.
   *
   * @param \Drupal\Core\Config\ImmutableConfig $community_about
   *   The community about.
   *
   * @return string
   *   The community name.
   */
  public function resolve(ImmutableConfig $community_about) : string {
    return $community_about
      ->get('name');
  }

}

Members

Namesort descending Modifiers Type Description Overrides
AboutName::resolve public function Returns the community about name.