Exemplo n.º 1
0
 /**
  * @param \Generated\Shared\Transfer\PageMapTransfer $pageMapTransfer
  * @param array $allParents
  * @param array $directParents
  *
  * @return $this
  */
 public function addCategory(PageMapTransfer $pageMapTransfer, array $allParents, array $directParents)
 {
     $categoryMapTransfer = new CategoryMapTransfer();
     $categoryMapTransfer->setAllParents($allParents)->setDirectParents($directParents);
     $pageMapTransfer->setCategory($categoryMapTransfer);
     return $this;
 }
Exemplo n.º 2
0
 /**
  * @param array $result
  * @param \Generated\Shared\Transfer\CategoryMapTransfer $categoryMap
  *
  * @return array
  */
 protected function transformCategory(array $result, CategoryMapTransfer $categoryMap)
 {
     $categoryMap->requireAllParents()->requireDirectParents();
     $result[PageIndexMap::CATEGORY] = [self::ALL_PARENTS => $categoryMap->getAllParents(), self::DIRECT_PARENTS => $categoryMap->getDirectParents()];
     return $result;
 }