/** * To list all enable states for this object. * @api * * @return string[] */ public function listEnabledStates() { if ($this->activesStates instanceof \ArrayAccess) { return array_keys($this->activesStates->getArrayCopy()); } else { return []; } }
/** * @inheritdoc */ public function removeState(StateInterface $state) { if ($this->hasState($state)) { $state->setCountry(null); $this->states->removeElement($state); } return $this; }
/** * Return state from collection by its name * * @param string $name * * @return State */ private function getState($name) { return $this->states->get($name); }