예제 #1
0
 public function Validate()
 {
     foreach ($this->validators as $id => $validator) {
         $validator->Validate();
         if (!$validator->IsValid()) {
             $this->page->AddFailedValidation($id, $validator);
         }
     }
     $this->isValidated = true;
 }
예제 #2
0
파일: Page.php 프로젝트: Trideon/gigolo
 /**
  * @param string $templateName
  * @param null $languageCode uses current language is nothing is passed in
  */
 protected function DisplayLocalized($templateName, $languageCode = null)
 {
     if (empty($languageCode)) {
         $languageCode = $this->GetVar('CurrentLanguage');
     }
     $localizedPath = ROOT_DIR . 'lang/' . $languageCode;
     $defaultPath = ROOT_DIR . 'lang/en_us/';
     if (file_exists($localizedPath . '/' . $templateName)) {
         $this->smarty->AddTemplateDirectory($localizedPath);
     } else {
         $this->smarty->AddTemplateDirectory($defaultPath);
     }
     $this->Display($templateName);
 }
예제 #3
0
파일: Control.php 프로젝트: hugutux/booked
 /**
  * @param SmartyPage|Smarty $smarty
  */
 public function __construct(SmartyPage $smarty)
 {
     $this->smarty = $smarty;
     $this->id = uniqid();
     $this->data = $smarty->createData();
 }
예제 #4
0
 public function Charset()
 {
     return $this->email->getTemplateVars('Charset');
 }