/**
  * Check if form is valid. If so set the values to the config array.
  * 
  * @param array $data   The form data posted.
  * @return bool         Whether or not form is valid.
  */
 public function IsValid($data = null, $entity = null)
 {
     $valid = parent::IsValid($data, $entity);
     if ($valid) {
         $this->_config->application->title = $data['title'];
         $this->_config->application->phalconCryptKey = $data['cryptkey'];
         $this->_config->application->background = $data['bgcolor'];
         $this->_config->application->debug = $data['debug'] ? '1' : '0';
     }
     return $valid;
 }
 /**
  * Check if form is valid. If so set the values to the config array.
  * 
  * @param array $data   The form data posted.
  * @return bool         Whether or not form is valid.
  */
 public function IsValid($data = null, $entity = null)
 {
     $valid = parent::IsValid($data, $entity);
     if ($valid) {
         $this->_config->dashboard->checkDeviceStatesInterval = $data['check-devicestate-interval'];
         $this->_config->dashboard->alertTimeout = $data['alert-timeout'];
         $this->_config->dashboard->phpSysInfoURL = $data['phpsysinfo-url'];
         $this->_config->dashboard->phpSysInfoVCore = $data['phpsysinfo-vcore'];
         $this->_config->dashboard->transmissionURL = $data['transmission-url'];
         $this->_config->dashboard->transmissionUsername = $data['transmission-username'];
         $this->_config->dashboard->transmissionPassword = $data['transmission-password'];
         $this->_config->dashboard->transmissionUpdateInterval = $data['transmission-update-interval'];
         $this->_config->dashboard->rotateMoviesInterval = $data['rotate-movies-interval'];
         $this->_config->dashboard->rotateEpisodesInterval = $data['rotate-episodes-interval'];
         $this->_config->dashboard->rotateAlbumsInterval = $data['rotate-albums-interval'];
     }
     return $valid;
 }