public function isRequired() { if (null === $this->parent || $this->parent->isRequired()) { return $this->required; } return false; }