Exemplo n.º 1
0
 /**
  * We add 'Root category listings format' widget into the default section
  *
  * @param array $params
  * @param array $sections
  */
 public function __construct(array $params = array(), array $sections = array())
 {
     parent::__construct($params, $sections);
     $schema = array();
     foreach ($this->schemaDefault as $name => $value) {
         $schema[$name] = $value;
         if ('description' === $name) {
             $schema['root_category_look'] = array(self::SCHEMA_CLASS => 'XLite\\View\\FormField\\Select\\RootCategoriesLook', self::SCHEMA_LABEL => 'Root category listings format', self::SCHEMA_REQUIRED => false);
         }
     }
     $this->schemaDefault = $schema;
 }
Exemplo n.º 2
0
 /**
  * OG widgets into the default section
  *
  * @param array $params
  * @param array $sections
  */
 public function __construct(array $params = array(), array $sections = array())
 {
     parent::__construct($params, $sections);
     $schema = array();
     $useCustomOgAdded = false;
     foreach ($this->schemaDefault as $name => $value) {
         $schema[$name] = $value;
         if ('meta_desc' == $name) {
             $schema['useCustomOG'] = $this->defineCustomOgField();
             $useCustomOgAdded = true;
         }
     }
     if (!$useCustomOgAdded) {
         $schema['useCustomOG'] = $this->defineCustomOgField();
     }
     $this->schemaDefault = $schema;
 }
Exemplo n.º 3
0
 /**
  * Save current form reference and initialize the cache
  *
  * @param array $params   Widget params OPTIONAL
  * @param array $sections Sections list OPTIONAL
  *
  * @return void
  */
 public function __construct(array $params = array(), array $sections = array())
 {
     $this->schemaDefault['useClasses'] = array(static::SCHEMA_CLASS => 'XLite\\Module\\XC\\ProductFilter\\View\\FormField\\Select\\UseClasses', static::SCHEMA_LABEL => 'Classes for product filter', static::SCHEMA_REQUIRED => false);
     $this->schemaDefault['productClasses'] = array(static::SCHEMA_CLASS => 'XLite\\Module\\XC\\ProductFilter\\View\\FormField\\Select\\Classes', static::SCHEMA_FIELD_ONLY => true);
     parent::__construct($params, $sections);
 }