You are here

interface AmpPrepareMetadataJsonInterface in Accelerated Mobile Pages (AMP) 8

Provides an interface for preparing AMP Metadata JSON.

Hierarchy

Expanded class hierarchy of AmpPrepareMetadataJsonInterface

All classes that implement AmpPrepareMetadataJsonInterface

1 file declares its use of AmpPrepareMetadataJsonInterface
AmpPrepareMetadataJson.php in src/Utility/AmpPrepareMetadataJson.php

File

src/AmpPrepareMetadataJsonInterface.php, line 10

Namespace

Drupal\amp
View source
interface AmpPrepareMetadataJsonInterface {

  /**
   * Gets the encoded AMP metadata JSON.
   *
   * @param array $amp_metadata_settings
   *   The array containing AMP metadata settings.
   * @param string $canonical_url
   *   The canonical url for this node.
   * @param NodeInterface $node
   *   The node object.
   *
   * @return string
   *   A JSON encoded string on success or FALSE on failure.
   */
  public function getJson(array $amp_metadata_settings, $canonical_url, NodeInterface $node);

  /**
   * Gets the array containing metadata ready to be converted to JSON.
   */
  public function getPreparedMetadataJson();

  /**
   * Allows additions or changes to metadata ready to be converted to JSON.
   *
   * @param array $prepared_metadata
   */
  public function setPreparedMetadataJson($prepared_metadata);

  /**
   * Get the list of metadata items.
   */
  public function getAmpMetadataList();

  /**
   * Sets the list of metadata items.
   */
  public function setAmpMetadataList();

}

Members

Namesort descending Modifiers Type Description Overrides
AmpPrepareMetadataJsonInterface::getAmpMetadataList public function Get the list of metadata items. 1
AmpPrepareMetadataJsonInterface::getJson public function Gets the encoded AMP metadata JSON. 1
AmpPrepareMetadataJsonInterface::getPreparedMetadataJson public function Gets the array containing metadata ready to be converted to JSON. 1
AmpPrepareMetadataJsonInterface::setAmpMetadataList public function Sets the list of metadata items. 1
AmpPrepareMetadataJsonInterface::setPreparedMetadataJson public function Allows additions or changes to metadata ready to be converted to JSON. 1