예제 #1
0
파일: Element.php 프로젝트: ouk/forms
 /**
  * @param Element $element элемент родитель
  * @throws Exception
  */
 public function setParent(Element $element)
 {
     if (!$element->getChild($this) instanceof Element) {
         throw new Exception('Элемент должен являться потомком');
     }
     $this->parent = $element;
 }