You are here

interface MetatagManagerInterface in Metatag 8

Class MetatagManager.

@package Drupal\metatag

Hierarchy

Expanded class hierarchy of MetatagManagerInterface

All classes that implement MetatagManagerInterface

8 files declare their use of MetatagManagerInterface
GenerateTagCommand.php in src/Command/GenerateTagCommand.php
MetatagDefaultsForm.php in src/Form/MetatagDefaultsForm.php
MetatagFirehose.php in src/Plugin/Field/FieldWidget/MetatagFirehose.php
MetatagSettingsForm.php in src/Form/MetatagSettingsForm.php
MetatagViewsController.php in metatag_views/src/Controller/MetatagViewsController.php

... See full list

File

src/MetatagManagerInterface.php, line 12

Namespace

Drupal\metatag
View source
interface MetatagManagerInterface {

  /**
   * Extracts all tags of a given entity.
   *
   * @param \Drupal\Core\Entity\ContentEntityInterface $entity
   *   The content entity to extract meta tags from.
   *
   * @return array
   *   Array of metatags.
   */
  public function tagsFromEntity(ContentEntityInterface $entity);

  /**
   * Extracts all tags of a given entity.
   *
   * And combines them with sitewide, per-entity-type, and per-bundle defaults.
   *
   * @param \Drupal\Core\Entity\ContentEntityInterface $entity
   *   The content entity to extract meta tags from.
   *
   * @return array
   *   Array of metatags.
   */
  public function tagsFromEntityWithDefaults(ContentEntityInterface $entity);

  /**
   * Extracts all appropriate default tags for an entity.
   *
   * From sitewide, per-entity-type, and per-bundle defaults.
   *
   * @param \Drupal\Core\Entity\ContentEntityInterface $entity
   *   The content entity for which to calculate defaults.
   *
   * @return array
   *   Array of metatags.
   */
  public function defaultTagsFromEntity(ContentEntityInterface $entity);

  /**
   * Returns an array of group plugin information sorted by weight.
   *
   * @return array
   *   Array of groups, sorted by weight.
   */
  public function sortedGroups();

  /**
   * Returns an array of tag plugin information sorted by group then weight.
   *
   * @return array
   *   Array of tags, sorted by weight.
   */
  public function sortedTags();

  /**
   * Returns a weighted array of groups containing their weighted tags.
   *
   * @return array
   *   Array of sorted tags, in groups.
   */
  public function sortedGroupsWithTags();

  /**
   * Builds the form element for a Metatag field.
   *
   * If a list of either groups or tags are passed in, those will be used to
   * limit the groups/tags on the form. If nothing is passed in, all groups
   * and tags will be used.
   *
   * @param array $values
   *   Existing values.
   * @param array $element
   *   Existing element.
   * @param array $token_types
   *   Token types to return in the tree.
   * @param array $included_groups
   *   Available group plugins.
   * @param array $included_tags
   *   Available tag plugins.
   * @param bool $verbose_help
   *   Whether to include extra help text at the top of the form or keep it
   *   short.
   *
   * @return array
   *   Render array for metatag form.
   */
  public function form(array $values, array $element, array $token_types = [], array $included_groups = NULL, array $included_tags = NULL, $verbose_help = FALSE);

}

Members

Namesort descending Modifiers Type Description Overrides
MetatagManagerInterface::defaultTagsFromEntity public function Extracts all appropriate default tags for an entity. 1
MetatagManagerInterface::form public function Builds the form element for a Metatag field. 1
MetatagManagerInterface::sortedGroups public function Returns an array of group plugin information sorted by weight. 1
MetatagManagerInterface::sortedGroupsWithTags public function Returns a weighted array of groups containing their weighted tags. 1
MetatagManagerInterface::sortedTags public function Returns an array of tag plugin information sorted by group then weight. 1
MetatagManagerInterface::tagsFromEntity public function Extracts all tags of a given entity. 1
MetatagManagerInterface::tagsFromEntityWithDefaults public function Extracts all tags of a given entity. 1