protected function handleRequest()
 {
     $this->errorMessageContainer = $this->form->getValidationResults();
     if (!$this->errorMessageContainer->isAnyErrorMessage()) {
         if ($this->record['id']) {
             $this->record['userPasswordChangeCode'] = null;
             $this->record['userPassword'] = $this->form->getField('userPassword')->getValue();
             $this->dao->save($this->record);
             CoreServices2::getAccess()->login($this->record['userEmail'], $this->record['userPassword']);
             $this->redirectAddress = CoreServices2::getUrl()->getCurrentPageUrl('_sm', 'Save', 'id', $this->record['id']);
         }
     }
 }
 protected function initFileLinkHTML()
 {
     if ($this->fileRecord['fileCategory'] == 'image') {
         $this->fileLinkHTML = CoreServices2::getAttachmentLocationManager()->getImageLinkHTML($this->fileRecord, $this->form->getField('image_width')->getValue(), $this->form->getField('image_height')->getValue(), $this->form->getField('image_ignoreProportions')->getValue(), $this->form->getField('image_crop')->getValue(), $this->form->getField('image_backgroundColor')->getValue());
     } else {
         $this->fileLinkHTML = CoreServices2::getAttachmentLocationManager()->getLinkHTML($this->fileRecord);
     }
 }
 protected function createBasicFilterFormFields()
 {
     foreach ($this->getFilterTypes() as $fieldName => $filter) {
         $field = $filter->createField($fieldName);
         if (!empty($field)) {
             $this->filterForm->addField($field);
         }
     }
 }
 public function getValidationResults()
 {
     $messageManager = parent::getValidationResults();
     foreach ($this->vlfs as $vlfName => $vlf) {
         $rowCount = $vlf->getRowCount();
         $validatorTemplates = $this->vlfValidators[$vlfName];
         if ($rowCount && !empty($validatorTemplates)) {
             for ($i = 0; $i < $rowCount; $i++) {
                 if (!$vlf->getActualField($i, '_inactive')->getValue()) {
                     foreach ($validatorTemplates as $validatorTemplate) {
                         $actualValidator = clone $validatorTemplate;
                         $actualValidator->modifyFieldNamesForVLF($vlfName, $i);
                         $actualValidator->validate($messageManager);
                     }
                 }
             }
         }
     }
     return $messageManager;
 }
 protected function getAction()
 {
     return $this->form->getField('_action')->getValue();
 }