PluginProbe
YayMail – WooCommerce Email Customizer / trunk
YayMail – WooCommerce Email Customizer vtrunk
4.4.4 4.4.3 4.4.2 4.4.1 trunk 1.9.6 2.1.4 2.1.5 3.2.2 3.2.6 3.2.7.1 3.2.8.1 3.2.9 3.3 3.3.1 3.3.4 3.3.5 3.3.6 3.3.7 3.3.8 3.3.9 3.4 3.4.1 3.4.2 3.4.3 All 55 releases
yaymail / src / Elements / Column.php

Column.php in YayMail – WooCommerce Email Customizer trunk, at src/Elements/Column.php

35 lines 1.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace YayMail\Elements;
3
4 use YayMail\Abstracts\BaseElement;
5 use YayMail\Constants\AttributesData;
6 use YayMail\Utils\SingletonTrait;
7
8 /**
9 * Column Elements
10 */
11 class Column extends BaseElement {
12
13 use SingletonTrait;
14
15 protected static $type = 'column';
16
17 public $available_email_ids = [ YAYMAIL_ALL_EMAILS ];
18
19 public static function get_data( $width = 5, $attributes = [] ) {
20 return [
21 'id' => uniqid(),
22 'type' => self::$type,
23 'group' => 'hidden',
24 // only appears inside column_layout
25 'available' => true,
26 'children' => isset( $attributes['children'] ) ? $attributes['children'] : [],
27
28 'data' => [
29 'width' => isset( $attributes['width'] ) ? $attributes['width'] : $width,
30 'border' => isset( $attributes['border'] ) ? $attributes['border'] : AttributesData::BORDER_DEFAULT,
31 ],
32 ];
33 }
34 }
35