Esempio n. 1
0
 /**
  * Выполняется ли условие
  * @return bool
  */
 public function isSuitable()
 {
     if (empty($this->owner->{$this->condAttr})) {
         return true;
     } else {
         $match = Match::getMatch($this->owner->{$this->condTypeAttr});
         if ($match) {
             return $match->test($this->owner->{$this->condAttr});
         } else {
             return false;
         }
     }
 }
Esempio n. 2
0
 /**
  * Отображать ли данный виджет
  * @return bool
  */
 public function isShow()
 {
     if (empty($this->showCondType)) {
         return true;
     } else {
         $match = Match::getMatch($this->showCondType);
         if ($match) {
             return $match->test($this->showCond);
         } else {
             return false;
         }
     }
 }