You are here

public function InstantArticleFormatterInterface::viewInstantArticle in Facebook Instant Articles 3.x

Same name and namespace in other branches
  1. 8.2 src/Plugin/Field/InstantArticleFormatterInterface.php \Drupal\fb_instant_articles\Plugin\Field\InstantArticleFormatterInterface::viewInstantArticle()

Modifies the given instant article with the contents of this field.

Parameters

\Drupal\Core\Field\FieldItemListInterface $items: The field values to be rendered.

\Facebook\InstantArticles\Elements\InstantArticle $article: Instant article object to modify, rendering the contents of this field into it.

string $region: The Instant Article region name that the contents of this field should be rendered into.

\Symfony\Component\Serializer\Normalizer\NormalizerInterface $normalizer: Normalizer in case the formatter needs to recursively normalize, eg. in the case of a entity reference field.

string $langcode: (optional) The language that should be used to render the field. Defaults to the current content language.

17 methods override InstantArticleFormatterInterface::viewInstantArticle()
AdFormatter::viewInstantArticle in src/Plugin/Field/FieldFormatter/AdFormatter.php
Modifies the given instant article with the contents of this field.
AnalyticsFormatter::viewInstantArticle in src/Plugin/Field/FieldFormatter/AnalyticsFormatter.php
Modifies the given instant article with the contents of this field.
AuthorFormatter::viewInstantArticle in src/Plugin/Field/FieldFormatter/AuthorFormatter.php
Modifies the given instant article with the contents of this field.
AuthorReferenceFormatter::viewInstantArticle in src/Plugin/Field/FieldFormatter/AuthorReferenceFormatter.php
Modifies the given instant article with the contents of this field.
BlockquoteFormatter::viewInstantArticle in src/Plugin/Field/FieldFormatter/BlockquoteFormatter.php
Modifies the given instant article with the contents of this field.

... See full list

File

src/Plugin/Field/InstantArticleFormatterInterface.php, line 33

Class

InstantArticleFormatterInterface
Interface to define an operation to manipulate an InstantArticle object.

Namespace

Drupal\fb_instant_articles\Plugin\Field

Code

public function viewInstantArticle(FieldItemListInterface $items, InstantArticle $article, $region, NormalizerInterface $normalizer, $langcode = NULL);