示例#1
0
 /**
  * {@inheritdoc}
  */
 public function getParent()
 {
     if ($this->parent === false) {
         $parentId = $this->rawLayout->getParentId($this->id);
         if ($parentId) {
             $this->parent = new self($this->rawLayout, $this->typeHelper, $this->context, $this->data);
             $this->parent->initialize($parentId);
         } else {
             $this->parent = null;
         }
     }
     return $this->parent;
 }
示例#2
0
 /**
  * {@inheritdoc}
  */
 public function isParentFor($parentId, $id)
 {
     return $this->rawLayout->has($parentId) && $this->rawLayout->has($id) && $this->rawLayout->getParentId($id) === $this->rawLayout->resolveId($parentId);
 }