Пример #1
0
 /**
  * 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;
 }
Пример #2
0
 /**
  * Register CSS files
  *
  * @return array
  */
 public function getCSSFiles()
 {
     $list = parent::getCSSFiles();
     $list[] = 'modules/CDev/Sale/product_modify_sale/css/style.css';
     return $list;
 }
Пример #3
0
 /**
  * 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);
 }
Пример #4
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;
 }
Пример #5
0
 /**
  * Sanitize value
  *
  * @return mixed
  */
 protected function sanitize()
 {
     return trim(parent::sanitize());
 }
Пример #6
0
 /**
  * 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()));
 }
Пример #7
0
 /**
  * Get default value
  *
  * @return string
  */
 protected function getDefaultValue()
 {
     return parent::getDefaultValue() ?: '1';
 }
Пример #8
0
 /**
  * Define widget params
  *
  * @return void
  */
 protected function defineWidgetParams()
 {
     parent::defineWidgetParams();
     $this->widgetParams += array(static::PARAM_SEPARATOR => new \XLite\Model\WidgetParam\String('Separator', $this->getDefaultSeparator()));
 }