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 loginAndReload()
 {
     $success = CoreServices::get('access')->login($this->loginForm->getField('userEmail')->getValue(), $this->loginForm->getField('userPassword')->getValue(), $this->loginErrorMessageContainer);
     if ($success) {
         /*
         			// @TODO: na co to?
         			$this->checkCredits();
         */
         $this->redirectToPage(CoreServices2::getUrl()->getCurrentExactAddress(), 'standard');
     }
 }
 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']);
         }
     }
 }
 public function getField($fieldName)
 {
     $nameSegments = CoreServices::get('request')->getFormFieldNameSegments($fieldName);
     if (sizeof($nameSegments) == 1) {
         return parent::getField($fieldName);
     } elseif (sizeof($nameSegments) == 3) {
         return $this->vlfs[$nameSegments[0]]->getActualField($nameSegments[1], $nameSegments[2]);
     }
     throw new CoreException('Invalid field name \'' . $fieldName . '\'.');
 }
 protected function getAction()
 {
     return $this->form->getField('_action')->getValue();
 }