You are here

public function AmpProcessedText::getInfo in Accelerated Mobile Pages (AMP) 8

Same name and namespace in other branches
  1. 8.3 src/Element/AmpProcessedText.php \Drupal\amp\Element\AmpProcessedText::getInfo()
  2. 8.2 src/Element/AmpProcessedText.php \Drupal\amp\Element\AmpProcessedText::getInfo()

Returns the element properties for this element.

Return value

array An array of element properties. See \Drupal\Core\Render\ElementInfoManagerInterface::getInfo() for documentation of the standard properties of all elements, and the return value format.

Overrides ProcessedText::getInfo

File

src/Element/AmpProcessedText.php, line 25
Contains \Drupal\amp\Element\AmpProcessedText.

Class

AmpProcessedText
Provides an amp-processed text render element.

Namespace

Drupal\amp\Element

Code

public function getInfo() {
  $class = get_class($this);
  return array(
    '#text' => '',
    '#format' => NULL,
    '#filter_types_to_skip' => array(),
    '#langcode' => '',
    '#pre_render' => array(
      array(
        $class,
        'preRenderText',
      ),
      array(
        $class,
        'preRenderAmpText',
      ),
    ),
    '#cache' => [
      'contexts' => [
        'url.query_args:amp',
        'url.query_args:warnfix',
      ],
      'tags' => [
        'config:amp.settings',
      ],
    ],
  );
}