public function Validate() { foreach ($this->validators as $id => $validator) { $validator->Validate(); if (!$validator->IsValid()) { $this->page->AddFailedValidation($id, $validator); } } $this->isValidated = true; }
/** * @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); }
/** * @param SmartyPage|Smarty $smarty */ public function __construct(SmartyPage $smarty) { $this->smarty = $smarty; $this->id = uniqid(); $this->data = $smarty->createData(); }
public function Charset() { return $this->email->getTemplateVars('Charset'); }