public static function createFrom()

in src/Facebook/InstantArticles/Transformer/Rules/CaptionRule.php [41:67]


    public static function createFrom($configuration)
    {
        $caption_rule = self::create();
        $caption_rule->withSelector($configuration['selector']);

        $caption_rule->withProperties(
            [
                Caption::POSITION_BELOW,
                Caption::POSITION_CENTER,
                Caption::POSITION_ABOVE,

                Caption::ALIGN_LEFT,
                Caption::ALIGN_CENTER,
                Caption::ALIGN_RIGHT,

                Caption::SIZE_SMALL,
                Caption::SIZE_MEDIUM,
                Caption::SIZE_LARGE,
                Caption::SIZE_XLARGE,

                self::PROPERTY_DEFAULT
            ],
            $configuration
        );

        return $caption_rule;
    }