You are here

interface DrupalMetaTagInterface in Metatag 7

The master interface for all tags.

Hierarchy

Expanded class hierarchy of DrupalMetaTagInterface

All classes that implement DrupalMetaTagInterface

File

./metatag.inc, line 11
Metatag primary classes.

View source
interface DrupalMetaTagInterface {

  /**
   * Constructor.
   *
   * @param array $info
   *   The information about the meta tag from metatag_get_info().
   * @param array $data
   *   The data to load for this meta tag, usually including the item 'value'.
   */
  public function __construct(array $info, array $data = array());

  /**
   * Build the form for this meta tag.
   *
   * @return array
   *   A standard FormAPI array.
   */
  public function getForm();

  /**
   * Get the string value of this meta tag.
   *
   * @return string
   *   The value of this meta tag.
   */
  public function getValue();

  /**
   * Calculate the weight of this meta tag.
   *
   * @return int
   *   Weight.
   */
  public function getWeight();

  /**
   * Get the HTML tag for this meta tag.
   *
   * @return array
   *   A render array for this meta tag.
   */
  public function getElement();

  /**
   * Copied from text.module with the following changes:.
   *
   * Change 1: $size is required.
   * Change 2: $format is removed.
   * Change 3: Don't trim at the end of short sentences
   *   (https://www.drupal.org/node/1620104).
   * Change 4: Word boundaries (https://www.drupal.org/node/1482178).
   * Change 5: Trim the final string.
   *
   * @param string $text
   *   The string to be processed.
   * @param int $size
   *   The maximum length to trim the string to.
   *
   * @return string
   *   The string after it is truncated.
   */
  public static function textSummary($text, $size);

}

Members

Namesort descending Modifiers Type Description Overrides
DrupalMetaTagInterface::getElement public function Get the HTML tag for this meta tag. 1
DrupalMetaTagInterface::getForm public function Build the form for this meta tag. 1
DrupalMetaTagInterface::getValue public function Get the string value of this meta tag. 1
DrupalMetaTagInterface::getWeight public function Calculate the weight of this meta tag. 1
DrupalMetaTagInterface::textSummary public static function Copied from text.module with the following changes:. 1
DrupalMetaTagInterface::__construct public function Constructor. 1