Пример #1
0
 protected function initFieldSet()
 {
     parent::initFieldSet();
     $client_options = $this->entity->getClientOptions('-- Любой --');
     $client_field = coreFormElementsLibrary::get('select', 'client_id');
     $client_field->setOptions($client_options);
     $this->addField($client_field);
     $this->setFieldCaption('client_id', 'Клиент');
     $type_options = $this->entity->getTypeOptions('-- Любой --');
     $type_field = coreFormElementsLibrary::get('select', 'type');
     $type_field->setOptions($type_options);
     $this->addField($type_field);
     $this->setFieldCaption('type', 'Тип');
     $status_options = ocsPkgOcsOrderStatusHelperLibrary::getAllStatusOptions();
     $status_field = coreFormElementsLibrary::get('checkbox_collection', 'status');
     $status_field->setOptions($status_options);
     $status_field->setMaxColumns(2);
     $this->addField($status_field);
     $this->setFieldCaption('status', 'Статус');
     $date_field = coreFormElementsLibrary::get('date_range', 'date_range');
     $this->addField($date_field);
     $this->setFieldCaption('date_range', 'Дата создания');
 }