getCurrentInstance(); $myFormContainer = new \tao_actions_form_Instance($this->getCurrentClass(), $instance); $myForm = $myFormContainer->getForm(); $nameElement = $myForm->getElement(\tao_helpers_Uri::encode(ExcludedOSService::EXCLUDED_NAME)); $versionElement = $myForm->getElement(\tao_helpers_Uri::encode(ExcludedOSService::EXCLUDED_VERSION)); $nameElement->addClass('select2'); $versionElement->setHelp( "" ); if ($myForm->isSubmited() && $myForm->isValid()) { $values = $myForm->getValues(); // save properties $binder = new \tao_models_classes_dataBinding_GenerisFormDataBinder($instance); $binder->bind($values); $message = __('Instance saved'); $this->setData('message', $message); $this->setData('reload', true); } $this->setData('formTitle', __('Edit Excluded Operation System')); $this->setData('myForm', $myForm->render()); $this->setView('exclusionList/form.tpl'); } protected function getClassService(): ExcludedOSService { if (is_null($this->service)) { $this->service = $this->getServiceLocator()->get(ExcludedOSService::SERVICE_ID); } return $this->service; } }