You are here

protected function AdFormatter::getItemValue in Facebook Instant Articles 3.x

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

Return the value for the ad that we are interested in.

Parameters

\Drupal\Core\Field\FieldItemInterface $item: Field item.

Return value

mixed The value of the given field item that stores the Ad value we're interested in.

1 call to AdFormatter::getItemValue()
AdFormatter::viewInstantArticle in src/Plugin/Field/FieldFormatter/AdFormatter.php
Modifies the given instant article with the contents of this field.
1 method overrides AdFormatter::getItemValue()
AdLinkFormatter::getItemValue in src/Plugin/Field/FieldFormatter/AdLinkFormatter.php
Return the value for the ad that we are interested in.

File

src/Plugin/Field/FieldFormatter/AdFormatter.php, line 129

Class

AdFormatter
Plugin implementation of the 'fbia_ad' formatter.

Namespace

Drupal\fb_instant_articles\Plugin\Field\FieldFormatter

Code

protected function getItemValue(FieldItemInterface $item) {
  return $item->value;
}