<?php
namespace Website\Widgets\ContentSlider; use Moto; class ItemWidget extends Moto\System\Widgets\AbstractContainerWidget { protected $_name = 'content_slider.item'; protected static $_defaultProperties = array( ); protected $_templateType = 'templates'; protected $_templatePath = '@websiteWidgets/content_slider/templates/item.twig.html'; protected $_widgetId = true; public function getCssClasses() { $result = ''; if ($this->getPropertyValue('styles.background-color', false)) { $result .= ' ' . $this->getClassNameByBgColorName(); } if ($this->getPropertyValue('bgFixed', false)) { $result .= ' moto-background-fixed'; } if ($this->_parent->getPropertyValue('justify', false)) { $result .= ' moto-justify-content_' . $this->_parent->getPropertyValue('justify'); } if ($this->_parent->getPropertyValue('widthFixed', false)) { $result .= ' row-fixed moto-disabling_row-fixed'; } if (!$this->_parent->getPropertyValue('gutter', true)) { $result .= ' moto-disable-side-indents'; } return $result; } public function getClassNameByBgColorName() { return $this->getCssClassColor($this->getPropertyValue('styles.background-color'), 'moto-bg-'); } public function getStylesValue() { return $this->getPropertyValue('styles'); } public function _getBackgroundVideoCssClass() { $bgPosition = $this->getPropertyValue('bgPosition', ''); return 'moto-background-video moto-absolute-position' . (!empty($bgPosition) ? ' moto-absolute-position_' . str_replace(' ', '-', $bgPosition) : ''); } } 