function fb_instant_articles_display_fb_instant_articles_article_alter in Facebook Instant Articles 7.2
Implements hook_fb_instant_articles_article_alter().
See also
fb_instant_articles_display_module_implements_alter()
File
- modules/
fb_instant_articles_display/ fb_instant_articles_display.module, line 45 - Hook implementations for Facebook Instant Articles Display module.
Code
function fb_instant_articles_display_fb_instant_articles_article_alter($instantArticle, $context) {
if (!isset($context['entity_type']) || !isset($context['entity'])) {
return FALSE;
}
// We map the Entity properties here, so we can ensure it runs only once per
// Entity (during load). If other modules wish to alter this, they should
// implement hook_fb_instant_articles_article_alter().
\Drupal\fb_instant_articles_display\EntityPropertyMapper::create($context['entity_type'], $context['entity'], $instantArticle)
->map();
}