BuilderComponentRow.php
930 Bytes
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
33
34
35
36
37
38
39
40
41
42
43
<?php
namespace Nextend\SmartSlider3\SlideBuilder;
class BuilderComponentRow extends AbstractBuilderComponent {
protected $defaultData = array(
"type" => 'row',
"name" => 'Row',
"cols" => array(),
"desktopportraitpadding" => '10|*|10|*|10|*|10|*|px'
);
/** @var BuilderComponentCol[] */
private $cols = array();
/**
*
* @param AbstractBuilderComponent $container
*/
public function __construct($container) {
$container->add($this);
}
/**
* @param $layer BuilderComponentCol
*/
public function add($layer) {
$this->cols[] = $layer;
}
public function getData() {
$this->data['cols'] = array();
foreach ($this->cols as $layer) {
$this->data['cols'][] = $layer->getData();
}
return parent::getData();
}
}