private function DrupalInstantArticleDisplay::fieldFormatTextContainer in Facebook Instant Articles 7
Formatter for standard elements.
Parameters
$items:
InstantArticle $body:
TextContainer $text_container:
1 call to DrupalInstantArticleDisplay::fieldFormatTextContainer()
- DrupalInstantArticleDisplay::fieldFormatterView in modules/
fb_instant_articles_display/ src/ DrupalInstantArticleDisplay.php
File
- modules/
fb_instant_articles_display/ src/ DrupalInstantArticleDisplay.php, line 309 - 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 fieldFormatTextContainer($items, $body, $text_container) {
foreach ($items as $delta => $item) {
// @todo sanitize text before sending off to FB IA SDK?
// @todo how does this do with markup in $item['value']?
$body
->addChild($text_container
->appendText($item['value']));
}
}