예제 #1
0
파일: Block.php 프로젝트: ramunasd/platform
 /**
  * {@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);
 }