You are here

public static function ArticleWrapper::create in Facebook Instant Articles 7.2

Creates a Drupal wrapper for an InstantArticle object.

Parameters

array $context: An associative array of contextual information altering the InstantArticle object.

Return value

\Drupal\fb_instant_articles\ArticleWrapper

File

src/ArticleWrapper.php, line 72
Contains \Drupal\fb_instant_articles\ArticleWrapper.

Class

ArticleWrapper
Wraps a FB Instant SDK article object with Drupal Base module configs and hooks for extensibility (without class inheritance, which the FB Instant SDK prevents by design).

Namespace

Drupal\fb_instant_articles

Code

public static function create($context) {
  global $language;
  return new ArticleWrapper($context, $language->direction);
}