You are here

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

Same name and namespace in other branches
  1. 8.2 src/Element/AmpIframe.php \Drupal\amp\Element\AmpIframe::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/AmpIframe.php, line 34
Contains \Drupal\amp\Element\AmpIframe.

Class

AmpIframe
Provides a render element for an iframe rendered as an amp-iframe.

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,
        'preRenderAmpIframe',
      ),
    ),
    '#theme' => 'amp_iframe',
    '#cache' => [
      'contexts' => [
        'url.query_args:amp',
        'url.query_args:warnfix',
      ],
      'tags' => [
        'config:amp.settings',
      ],
    ],
  );
}