Xpressengine\Permission\PermissionRepository::fetchDescendant PHP Method

fetchDescendant() public method

Returns descendant of item
public fetchDescendant ( string $siteKey, string $name ) : array
$siteKey string site key
$name string target name
return array
    public function fetchDescendant($siteKey, $name);

Usage Example

Ejemplo n.º 1
0
 /**
  * Returns descendant of item
  *
  * @param Permission $item permission instance
  * @return array
  */
 public function fetchDescendant(Permission $item)
 {
     $key = $this->getCacheKey($item->siteKey, $item->name, 'descendant');
     if (!($descendants = $this->cache->get($key))) {
         $descendants = $this->repo->fetchDescendant($item);
         if (!empty($descendants)) {
             $this->cache->put($key, $descendants);
         }
     }
     return $descendants;
 }
All Usage Examples Of Xpressengine\Permission\PermissionRepository::fetchDescendant