b0y-101 Mini Shell


Current Path : E:/www/nongbua/libraries/nextend2/smartslider/smartslider/libraries/slidebuilder/
File Upload :
Current File : E:/www/nongbua/libraries/nextend2/smartslider/smartslider/libraries/slidebuilder/col.php

<?php

class N2SmartSliderSlideBuilderColumn extends N2SmartSliderSlideBuilderComponent {

    protected $defaultData = array(
        "type"     => 'col',
        "name"     => 'Col',
        "colwidth" => '1/1',
        "layers"   => array()
    );

    /** @var N2SmartSliderSlideBuilderComponent[] */
    private $layers = array();

    /**
     * N2SmartSliderSlideBuilderLayer constructor.
     *
     * @param N2SmartSliderSlideBuilderRow       $container
     * @param                                    $width
     */
    public function __construct($container, $width = '1/1') {

        $this->defaultData['colwidth'] = $width;

        $container->add($this);
    }

    /**
     * @param $layer N2SmartSliderSlideBuilderComponent
     */
    public function add($layer) {
        $this->layers[] = $layer;
    }

    public function getData() {
        $this->data['layers'] = array();
        foreach ($this->layers AS $layer) {
            $this->data['layers'][] = $layer->getData();
        }

        return parent::getData();
    }
}

Copyright © 2019 by b0y-101