protected function isState($state) { $current = $this->getState(); return is_array($state) ? in_array($current, $state) : $current == $state; }