1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
<?php namespace YayMail\Elements;
use YayMail\Abstracts\BaseElement; use YayMail\Utils\SingletonTrait;
/** * Column Elements */ class Column extends BaseElement {
use SingletonTrait;
protected static $type = 'column';
public $available_email_ids = [ YAYMAIL_ALL_EMAILS ];
public static function get_data( $width = 5, $attributes = [] ) { return [ 'id' => uniqid(), 'type' => self::$type, 'group' => 'hidden', // only appears inside column_layout 'available' => true, 'children' => isset( $attributes['children'] ) ? $attributes['children'] : [],
'data' => [ 'width' => isset( $attributes['width'] ) ? $attributes['width'] : $width, ], ]; } }
|