コード例 #1
0
 public function isItemSelected(SelectableProxy $item)
 {
     if (!$this->value) {
         return FALSE;
     }
     foreach ($this->value as $key) {
         if ($item->getKey() == $key) {
             return TRUE;
         }
     }
     return FALSE;
 }
コード例 #2
0
 public function isItemSelected(SelectableProxy $item)
 {
     $key = $item->getKey();
     if ($key == 0) {
         if ($this->value) {
             return FALSE;
         } else {
             return TRUE;
         }
     } elseif ($key == 1) {
         if ($this->value) {
             return TRUE;
         } else {
             return FALSE;
         }
     }
 }
コード例 #3
0
ファイル: SelectOneField.php プロジェクト: aktiWeb/formobject
 public function isItemSelected(SelectableProxy $item)
 {
     if ($item->getKey() === '' && $this->value === null) {
         return true;
     }
     if ($item->getKey() === '0' && $this->value === null) {
         return false;
     }
     if ($item->getKey() === 0 && $this->value === null) {
         return false;
     }
     if ($item->getKey() === 0 && $this->value === '') {
         return false;
     }
     return $item->getKey() == $this->value;
 }
コード例 #4
0
ファイル: SelectOneGroup.php プロジェクト: aktiWeb/formobject
 public function isItemSelected(SelectableProxy $item)
 {
     return $item->getKey() == $this->value;
 }