private function DrupalInstantArticleDisplay::fieldFormatAuthor in Facebook Instant Articles 7
Formatter for authors.
Parameters
$items:
Header $header:
1 call to DrupalInstantArticleDisplay::fieldFormatAuthor()
- DrupalInstantArticleDisplay::fieldFormatterView in modules/
fb_instant_articles_display/ src/ DrupalInstantArticleDisplay.php
File
- modules/
fb_instant_articles_display/ src/ DrupalInstantArticleDisplay.php, line 325 - Contains \Drupal\fb_instant_articles_display\DrupalInstantArticleDisplay.
Class
- DrupalInstantArticleDisplay
- Facebook Instant Article node wrapper class. Builds up an InstantArticle object using field formatters.
Namespace
Drupal\fb_instant_articles_displayCode
private function fieldFormatAuthor($items, $header) {
foreach ($items as $delta => $item) {
// @todo sanitize text before sending off to FB IA SDK?
$header
->addAuthor(Author::create()
->withName($item['value']));
}
}