Xpressengine\Permission\PermissionRepository::findByName PHP Method

findByName() public method

Find a registered by type and name
public findByName ( string $siteKey, string $name ) : Permission
$siteKey string site key
$name string target name
return Permission
    public function findByName($siteKey, $name);

Usage Example

Ejemplo n.º 1
0
 /**
  * Find a registered by type and name
  *
  * @param string $siteKey site key
  * @param string $name    target name
  * @return Permission
  */
 public function findByName($siteKey, $name)
 {
     $key = $this->getCacheKey($siteKey, $name);
     if (!($permission = $this->cache->get($key))) {
         if ($permission = $this->repo->findByName($siteKey, $name)) {
             $this->cache->put($key, $permission);
         }
     }
     return $permission;
 }
All Usage Examples Of Xpressengine\Permission\PermissionRepository::findByName