wp_back/wp-content/plugins/smart-slider-3/Nextend/SmartSlider3/SlideBuilder/BuilderComponentItem.php
2024-05-20 15:37:46 +03:00

41 lines
932 B
PHP

<?php
namespace Nextend\SmartSlider3\SlideBuilder;
use Nextend\SmartSlider3\Renderable\Item;
class BuilderComponentItem extends AbstractBuilderComponent {
/**
* @var Item\AbstractItem
*/
protected $item;
/**
*
* @param AbstractBuilderComponent $container
* @param string $type
*/
public function __construct($container, $type) {
$this->item = Item\ItemFactory::getItem($type);
$this->defaultData = array_merge($this->defaultData, $this->item->getValues());
$container->add($this);
}
public function getData() {
return array(
'type' => $this->item->getType(),
'values' => parent::getData()
);
}
public function getLabel() {
return $this->item->getTitle();
}
public function getLayerProperties() {
return $this->item->getLayerProperties();
}
}