Esempio n. 1
0
	/**
	 * Init the flash instance
	 */
	public static function initFlash() {
		if (self::$flash)
			return;

		self::$flash = self::getInstance(array(
			'prefix'=>'flash',
			'nameSpace'=>'flash',
		));

		self::$flashVars = self::$flash->getAll();
		self::$flash->clear();
	}
Esempio n. 2
0
 public function fillValues()
 {
     $defValues = $this->form->getValues();
     if (request::isPost() || request::getPrm($this->cfg->clearPrm)) {
         if (request::isPost()) {
             $this->form->refill();
         }
         $this->session->clear(true);
     } else {
         foreach ($this->form->getNames() as $name) {
             if ($this->session->check($name)) {
                 $this->form->setValue($name, $this->session->get($name));
             }
         }
         $this->form->setBound(false);
     }
     foreach ($this->form->getValues() as $k => $v) {
         if ($v != $defValues[$k]) {
             $this->hasValues = true;
         }
     }
 }