Exemplo n.º 1
0
 /**
  * Return list of form fields objects by schema
  *
  * @param array $schema Field descriptions
  *
  * @return array
  */
 protected function getFieldsBySchema(array $schema)
 {
     if (isset($schema['parent'])) {
         $schema['parent'][\XLite\View\FormField\Select\Category::PARAM_EXCLUDE_CATEGORY] = $this->getModelId();
         $schema['parent'][\XLite\View\FormField\Select\Category::PARAM_DISPLAY_ROOT_CATEGORY] = true;
         $schema['parent'][\XLite\View\FormField\Select\Category::PARAM_VALUE] = $this->getModelObject()->getParent()->getCategoryId();
     }
     return parent::getFieldsBySchema($schema);
 }