/** * Get common attributes * * @return array */ protected function getCommonAttributes() { $list = parent::getCommonAttributes(); // We encorage to upload the image files only. HTML5 support $list['accept'] = 'image/*'; return $list; }
/** * Register CSS files * * @return array */ public function getCSSFiles() { $list = parent::getCSSFiles(); $list[] = 'modules/CDev/Sale/product_modify_sale/css/style.css'; return $list; }
/** * Return field value * * @return array */ public function getValue() { $result = parent::getValue(); return is_array($result) && 3 == count($result) ? array_values($result) : array(0, 0, 0); }
/** * Get a list of CSS files required to display the widget properly * * @return array */ public function getCSSFiles() { $list = parent::getCSSFiles(); $list[] = $this->getDir() . '/input/text/dimensions.css'; return $list; }
/** * Sanitize value * * @return mixed */ protected function sanitize() { return trim(parent::sanitize()); }
/** * Define widget params * * @return void */ protected function defineWidgetParams() { parent::defineWidgetParams(); $this->widgetParams += array(static::PARAM_ROWS => new \XLite\Model\WidgetParam\Int('Rows', $this->getDefaultRows()), static::PARAM_COLS => new \XLite\Model\WidgetParam\Int('Cols', $this->getDefaultCols())); }
/** * Get default value * * @return string */ protected function getDefaultValue() { return parent::getDefaultValue() ?: '1'; }
/** * Define widget params * * @return void */ protected function defineWidgetParams() { parent::defineWidgetParams(); $this->widgetParams += array(static::PARAM_SEPARATOR => new \XLite\Model\WidgetParam\String('Separator', $this->getDefaultSeparator())); }