public function isItemSelected(SelectableProxy $item) { if (!$this->value) { return FALSE; } foreach ($this->value as $key) { if ($item->getKey() == $key) { return TRUE; } } return FALSE; }
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; } } }
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; }
public function isItemSelected(SelectableProxy $item) { return $item->getKey() == $this->value; }