Facebook\InstantArticles\Transformer\Rules\ImageRule::createFrom PHP Method

createFrom() public static method

public static createFrom ( $configuration )
    public static function createFrom($configuration)
    {
        $image_rule = static::create();
        $image_rule->withSelector($configuration['selector']);
        $image_rule->withProperties([self::PROPERTY_IMAGE_URL, self::PROPERTY_LIKE, self::PROPERTY_COMMENTS, self::ASPECT_FIT, self::ASPECT_FIT_ONLY, self::FULLSCREEN, self::NON_INTERACTIVE], $configuration);
        return $image_rule;
    }