Пример #1
0
 /**
  * Validate states
  *
  * @return bool
  */
 public function isValid()
 {
     parent::isValid();
     // state
     if (!in_array($this->getState(), $this->getAllStates(false), true)) {
         $this->_errors['state'][] = Mage::helper('sales')->__('Wrong state: "%s".', $this->getState());
     }
     return empty($this->_errors);
 }