phpDoc: \humhub\modules\user\components\PermissionManager::can

This commit is contained in:
githubjeka 2017-03-21 10:53:02 +03:00
parent a4b02b1325
commit 0dba04df9d

View File

@ -22,31 +22,31 @@ class PermissionManager extends \yii\base\Component
/**
* User identity.
* @var \humhub\modules\user\models\User
* @var \humhub\modules\user\models\User
*/
public $subject;
/**
* Cached Permission array.
* @var array
* @var array
*/
protected $permissions = null;
/**
* Permission access cache.
* @var array
* @var array
*/
protected $_access = [];
/**
* Verifies a given $permission or $permission array for a permission subject.
*
*
* If $params['all'] is set to true and a $permission array is given all given permissions
* have to be verified successfully otherwise (default) only one permission test has to pass.
*
* @param type $permission
* @param type $params
* @param type $allowCaching
*
* @param array|BasePermission|mixed $permission
* @param array $params
* @param boolean $allowCaching
* @return boolean
*/
public function can($permission, $params = [], $allowCaching = true)
@ -77,7 +77,7 @@ class PermissionManager extends \yii\base\Component
/**
* Verifies a single permission for a given permission subject.
*
*
* @param BasePermission $permission
* @return boolean
*/
@ -93,9 +93,9 @@ class PermissionManager extends \yii\base\Component
/**
* Returns the permission subject identity.
* If the permission objects $subject property is not set this method returns the currently
* If the permission objects $subject property is not set this method returns the currently
* logged in user identity.
*
*
* @return \humhub\modules\user\models\User
*/
protected function getSubject()
@ -113,7 +113,7 @@ class PermissionManager extends \yii\base\Component
/**
* Sets the state for a given groupId.
*
*
* @param string $groupId
* @param BasePermission $permission
* @param string $state
@ -146,7 +146,7 @@ class PermissionManager extends \yii\base\Component
* Returns the group permission state of the given group or goups.
* If the provided $group is an array we check if one of the group states
* is a BasePermission::STATE_ALLOW and return this state.
*
*
* @param type $groups either an array of groups or group ids or an single group or goup id
* @param BasePermission $permission
* @param type $returnDefaultState
@ -169,7 +169,7 @@ class PermissionManager extends \yii\base\Component
/**
* Returns the group state
*
*
* @param string $groupId
* @param BasePermission $permission
* @param boolean $returnDefaultState
@ -197,7 +197,7 @@ class PermissionManager extends \yii\base\Component
/**
* Returns a BasePermission by Id
*
*
* @param string $permissionId
* @param string $moduleId
* @return BasePermission
@ -226,7 +226,7 @@ class PermissionManager extends \yii\base\Component
/**
* Returns a list of all Permission objects
*
*
* @return array of BasePermissions
*/
public function getPermissions()
@ -250,7 +250,7 @@ class PermissionManager extends \yii\base\Component
/**
* Returns permissions provided by a module
*
*
* @param \yii\base\Module $module
* @return array of BasePermissions
*/
@ -265,7 +265,7 @@ class PermissionManager extends \yii\base\Component
/**
* Creates a Permission Database record
*
*
* @return Permission
*/
protected function createPermissionRecord()
@ -275,7 +275,7 @@ class PermissionManager extends \yii\base\Component
/**
* Creates a Permission Database Query
*
*
* @return \yii\db\ActiveQuery
*/
protected function getQuery()
@ -285,7 +285,7 @@ class PermissionManager extends \yii\base\Component
/**
* Returns Permission Array
*
*
* @param int $groupId id of the group
* @return array the permission array
*/