/**
  * getResourceWithNamespace
  *
  * @param string $resourceId
  * @param null   $namespaceSeparator
  *
  * @return array
  */
 public function getResourceWithNamespace($resourceId, $namespaceSeparator = null)
 {
     $resource = $this->resourceProvider->getResource($resourceId);
     $resourceTree = $this->aclResourceStackBuilder->build($resource);
     $ns = $this->createNamespaceId($resource, $resourceTree, $namespaceSeparator);
     return $this->getNsModel($resource, $ns);
 }
Beispiel #2
0
 /**
  * getResourceLineage
  * - Get a resource and all of its parents as array of resources
  *
  * @param $resourceId
  *
  * @return array
  */
 public function getResourceLineage($resourceId)
 {
     $resource = $this->resourceProvider->getResource($resourceId);
     if ($resource === null) {
         return [];
     }
     return $this->aclResourceStackBuilder->build($resource);
 }