Exemple #1
0
 private function getGroup()
 {
     if ($this->group != null) {
         return $this->group;
     }
     $group = null;
     $callback = function (Component &$component) use(&$group) {
         $group = $component;
         return Component::VISITOR_STOP_TRAVERSAL;
     };
     $this->visitParents(CheckBoxGroup::getIdentifier(), $callback);
     $this->group = $group;
     if ($group == null) {
         throw new \RuntimeException('A check must be a child of CheckBoxGroup');
     }
     return $group;
 }