/** * {@inheritdoc} */ public function getComplexPerm(rex_user $user, $key) { if (isset($this->complexPerms[$key])) { return $this->complexPerms[$key]; } $perms = []; if (isset($this->complexPermParams[$key])) { $perms = $this->complexPermParams[$key] == rex_complex_perm::ALL ? rex_complex_perm::ALL : explode('|', trim($this->complexPermParams[$key], '|')); } $this->complexPerms[$key] = rex_complex_perm::get($user, $key, $perms); return $this->complexPerms[$key]; }
/** * Returns the complex perm for the user. * * @param string $key Complex perm key * * @return rex_complex_perm Complex perm */ public function getComplexPerm($key) { if ($this->hasRole()) { return $this->role->getComplexPerm($this, $key); } return rex_complex_perm::get($this, $key); }