| 1 | <?php |
||
| 9 | class GenericTemplate extends AbstractTemplate |
||
| 10 | { |
||
| 11 | public const IMAGE_RATIO_HORIZONTAL = 'horizontal'; |
||
| 12 | public const IMAGE_RATIO_SQUARE = 'square'; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @var \Kerox\Messenger\Model\Message\Attachment\Template\Element\GenericElement[] |
||
| 16 | */ |
||
| 17 | protected $elements; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @var string |
||
| 21 | */ |
||
| 22 | protected $imageRatio; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * Generic constructor. |
||
| 26 | * |
||
| 27 | * @param \Kerox\Messenger\Model\Message\Attachment\Template\Element\GenericElement[] $elements |
||
| 28 | * |
||
| 29 | * @throws \Kerox\Messenger\Exception\MessengerException |
||
| 30 | */ |
||
| 31 | 3 | public function __construct(array $elements, string $imageRatio = self::IMAGE_RATIO_HORIZONTAL) |
|
| 40 | |||
| 41 | /** |
||
| 42 | *@throws \Kerox\Messenger\Exception\MessengerException |
||
| 43 | * |
||
| 44 | * @return \Kerox\Messenger\Model\Message\Attachment\Template\GenericTemplate |
||
| 45 | */ |
||
| 46 | 3 | public static function create(array $elements, string $imageRatio = self::IMAGE_RATIO_HORIZONTAL): self |
|
| 50 | |||
| 51 | 3 | public function toArray(): array |
|
| 64 | } |
||
| 65 |