'ets_mls_layer', 'primary' => 'id_layer', 'multilang' => true, 'fields' => array( 'id_slide' => array('type' => self::TYPE_INT), 'layer_type' => array('type' => self::TYPE_STRING), 'font_size' => array('type' => self::TYPE_FLOAT), 'text_color'=> array('type'=>self::TYPE_STRING), 'top' => array('type' => self::TYPE_FLOAT), 'left' => array('type' => self::TYPE_FLOAT), 'right' => array('type' => self::TYPE_FLOAT), 'top_right' => array('type' => self::TYPE_FLOAT), 'image'=>array('type'=>self::TYPE_STRING), 'width'=>array('type'=>self::TYPE_STRING), 'height'=>array('type'=>self::TYPE_STRING), 'font_family'=>array('type'=>self::TYPE_STRING), 'text_decoration'=>array('type'=>self::TYPE_STRING), 'text_transform'=>array('type'=>self::TYPE_STRING), 'padding'=>array('type'=>self::TYPE_STRING), 'box_radius'=>array('type'=>self::TYPE_INT), 'font_weight'=>array('type'=>self::TYPE_STRING), 'background_color'=>array('type'=>self::TYPE_STRING), 'background_opacity'=>array('type'=>self::TYPE_FLOAT), 'animation_in'=>array('type'=>self::TYPE_STRING), 'animation_out'=>array('type'=>self::TYPE_STRING), 'move_in' => array('type' => self::TYPE_INT), 'move_out' => array('type' => self::TYPE_INT), 'start_delay' => array('type'=>self::TYPE_INT), 'stand_duration'=> array('type'=>self::TYPE_INT), 'sort_order' =>array('type'=>self::TYPE_INT), 'content_layer' => array('type' => self::TYPE_HTML, 'lang' => true, 'validate' => 'isCleanHtml'), 'link' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isCleanHtml'), ) ); public function __construct($id_item = null, $id_lang = null, $id_shop = null, Context $context = null) { parent::__construct($id_item, $id_lang, $id_shop); $languages = Language::getLanguages(false); foreach($languages as $lang) { foreach(self::$definition['fields'] as $field => $params) { $temp = $this->$field; if(isset($params['lang']) && $params['lang'] && !isset($temp[$lang['id_lang']])) { $temp[$lang['id_lang']] = ''; } $this->$field = $temp; } } unset($context); $this->setFields(Ets_mls_defines::getLayers($id_item, null)); } public function add($auto_date = true, $null_values = false) { $this->module->_clearCacheWhenUpdateLayer($this->id); return parent::add($auto_date, $null_values); // TODO: Change the autogenerated stub } public function update($null_values = false) { $this->module->_clearCacheWhenUpdateLayer($this->id); return parent::update($null_values); // TODO: Change the autogenerated stub } public function delete() { $this->module->_clearCacheWhenUpdateLayer($this->id); return parent::delete(); // TODO: Change the autogenerated stub } }