private function DrupalInstantArticleDisplay::fieldFormatCredits in Facebook Instant Articles 7
Formatter for credits.
Parameters
$items:
Footer $footer:
1 call to DrupalInstantArticleDisplay::fieldFormatCredits()
- DrupalInstantArticleDisplay::fieldFormatterView in modules/
fb_instant_articles_display/ src/ DrupalInstantArticleDisplay.php
File
- modules/
fb_instant_articles_display/ src/ DrupalInstantArticleDisplay.php, line 341 - 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 fieldFormatCredits($items, $footer) {
// We can only have a single credits group.
// @todo sanitize text before sending off to FB IA SDK?
if (!empty($items[0]['value'])) {
$footer
->withCredits($items[0]['value']);
}
}