interface InstantArticleFormatterInterface in Facebook Instant Articles 8.2
Same name and namespace in other branches
- 3.x src/Plugin/Field/InstantArticleFormatterInterface.php \Drupal\fb_instant_articles\Plugin\Field\InstantArticleFormatterInterface
Interface to define an operation to manipulate an InstantArticle object.
Hierarchy
- interface \Drupal\Component\Plugin\PluginInspectionInterface; interface \Drupal\Core\Config\Entity\ThirdPartySettingsInterface
- interface \Drupal\Core\Field\PluginSettingsInterface
- interface \Drupal\Core\Field\FormatterInterface
- interface \Drupal\fb_instant_articles\Plugin\Field\InstantArticleFormatterInterface
- interface \Drupal\Core\Field\FormatterInterface
- interface \Drupal\Core\Field\PluginSettingsInterface
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
File
- src/
Plugin/ Field/ InstantArticleFormatterInterface.php, line 13
Namespace
Drupal\fb_instant_articles\Plugin\FieldView 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
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
FormatterInterface:: |
public static | function | Returns if the formatter can be used for the provided field. | 1 |
FormatterInterface:: |
public | function | Allows formatters to load information for field values being displayed. | 1 |
FormatterInterface:: |
public | function | Returns a form to configure settings for the formatter. | 1 |
FormatterInterface:: |
public | function | Returns a short summary for the current formatter settings. | 1 |
FormatterInterface:: |
public | function | Builds a renderable array for a fully themed field. | 1 |
FormatterInterface:: |
public | function | Builds a renderable array for a field value. | 47 |
InstantArticleFormatterInterface:: |
public | function | Modifies the given instant article with the contents of this field. | 17 |
PluginInspectionInterface:: |
public | function | Gets the definition of the plugin implementation. | 4 |
PluginInspectionInterface:: |
public | function | Gets the plugin_id of the plugin instance. | 2 |
PluginSettingsInterface:: |
public static | function | Defines the default settings for this plugin. | 1 |
PluginSettingsInterface:: |
public | function | Returns the value of a setting, or its default value if absent. | 1 |
PluginSettingsInterface:: |
public | function | Returns the array of settings, including defaults for missing settings. | 1 |
PluginSettingsInterface:: |
public | function | Informs the plugin that some configuration it depends on will be deleted. | 1 |
PluginSettingsInterface:: |
public | function | Sets the value of a setting for the plugin. | 1 |
PluginSettingsInterface:: |
public | function | Sets the settings for the plugin. | 1 |
ThirdPartySettingsInterface:: |
public | function | Gets the list of third parties that store information. | 5 |
ThirdPartySettingsInterface:: |
public | function | Gets the value of a third-party setting. | 5 |
ThirdPartySettingsInterface:: |
public | function | Gets all third-party settings of a given module. | 5 |
ThirdPartySettingsInterface:: |
public | function | Sets the value of a third-party setting. | 5 |
ThirdPartySettingsInterface:: |
public | function | Unsets a third-party setting. | 5 |