You are here

interface InstantArticleFormatterInterface 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

Interface to define an operation to manipulate an InstantArticle object.

Hierarchy

Expanded class hierarchy of InstantArticleFormatterInterface

All classes that implement InstantArticleFormatterInterface

6 files declare their use of InstantArticleFormatterInterface
AuthorReferenceFormatter.php in src/Plugin/Field/FieldFormatter/AuthorReferenceFormatter.php
EntityReferenceEntityFormatter.php in src/Plugin/Field/FieldFormatter/EntityReferenceEntityFormatter.php
FieldItemListNormalizer.php in src/Normalizer/FieldItemListNormalizer.php
FormatterBase.php in src/Plugin/Field/FieldFormatter/FormatterBase.php
ImageFormatter.php in src/Plugin/Field/FieldFormatter/ImageFormatter.php

... See full list

File

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

Namespace

Drupal\fb_instant_articles\Plugin\Field
View source
interface InstantArticleFormatterInterface extends FormatterInterface {

  /**
   * Modifies the given instant article with the contents of this field.
   *
   * @param \Drupal\Core\Field\FieldItemListInterface $items
   *   The field values to be rendered.
   * @param \Facebook\InstantArticles\Elements\InstantArticle $article
   *   Instant article object to modify, rendering the contents of this field
   *   into it.
   * @param string $region
   *   The Instant Article region name that the contents of this field should be
   *   rendered into.
   * @param \Symfony\Component\Serializer\Normalizer\NormalizerInterface $normalizer
   *   Normalizer in case the formatter needs to recursively normalize, eg. in
   *   the case of a entity reference field.
   * @param string $langcode
   *   (optional) The language that should be used to render the field. Defaults
   *   to the current content language.
   */
  public function viewInstantArticle(FieldItemListInterface $items, InstantArticle $article, $region, NormalizerInterface $normalizer, $langcode = NULL);

}

Members

Namesort descending Modifiers Type Description Overrides
FormatterInterface::isApplicable public static function Returns if the formatter can be used for the provided field. 1
FormatterInterface::prepareView public function Allows formatters to load information for field values being displayed. 1
FormatterInterface::settingsForm public function Returns a form to configure settings for the formatter. 1
FormatterInterface::settingsSummary public function Returns a short summary for the current formatter settings. 1
FormatterInterface::view public function Builds a renderable array for a fully themed field. 1
FormatterInterface::viewElements public function Builds a renderable array for a field value. 47
InstantArticleFormatterInterface::viewInstantArticle public function Modifies the given instant article with the contents of this field. 17
PluginInspectionInterface::getPluginDefinition public function Gets the definition of the plugin implementation. 4
PluginInspectionInterface::getPluginId public function Gets the plugin_id of the plugin instance. 2
PluginSettingsInterface::defaultSettings public static function Defines the default settings for this plugin. 1
PluginSettingsInterface::getSetting public function Returns the value of a setting, or its default value if absent. 1
PluginSettingsInterface::getSettings public function Returns the array of settings, including defaults for missing settings. 1
PluginSettingsInterface::onDependencyRemoval public function Informs the plugin that some configuration it depends on will be deleted. 1
PluginSettingsInterface::setSetting public function Sets the value of a setting for the plugin. 1
PluginSettingsInterface::setSettings public function Sets the settings for the plugin. 1
ThirdPartySettingsInterface::getThirdPartyProviders public function Gets the list of third parties that store information. 5
ThirdPartySettingsInterface::getThirdPartySetting public function Gets the value of a third-party setting. 5
ThirdPartySettingsInterface::getThirdPartySettings public function Gets all third-party settings of a given module. 5
ThirdPartySettingsInterface::setThirdPartySetting public function Sets the value of a third-party setting. 5
ThirdPartySettingsInterface::unsetThirdPartySetting public function Unsets a third-party setting. 5