Class humhub\modules\user\permissions\ViewAboutPage

Inheritancehumhub\modules\user\permissions\ViewAboutPage » humhub\libs\BasePermission » yii\base\BaseObject

ViewAboutPage Permission

Protected Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$defaultState string humhub\libs\BasePermission
$description string Description of the permission humhub\modules\user\permissions\ViewAboutPage
$fixedGroups array Default fixed groups humhub\modules\user\permissions\ViewAboutPage
$id string Id of the permission (default is classname) humhub\libs\BasePermission
$moduleId string Module id which belongs to the permission humhub\modules\user\permissions\ViewAboutPage
$title string Title of the permission humhub\modules\user\permissions\ViewAboutPage

Public Methods

Hide inherited methods

MethodDescriptionDefined By
__construct() humhub\modules\user\permissions\ViewAboutPage
canChangeState() Checks if permission state can be changed humhub\libs\BasePermission
getDefaultState() Returns the default state of the permission. humhub\modules\user\permissions\ViewAboutPage
getDescription() Returns the description humhub\libs\BasePermission
getId() Returns the ID humhub\libs\BasePermission
getLabelForState() Returns the label for given State humhub\libs\BasePermission
getModuleId() Returns the module id humhub\libs\BasePermission
getTitle() Returns the title humhub\libs\BasePermission
hasId() Checks the given id belongs to this permission humhub\libs\BasePermission

Protected Methods

Hide inherited methods

MethodDescriptionDefined By
getConfiguredState() Returns the default state set in the configration params 'defaultPermissions'. humhub\libs\BasePermission

Constants

Hide inherited constants

ConstantValueDescriptionDefined By
STATE_ALLOW 1 humhub\libs\BasePermission
STATE_DEFAULT '' Permission States humhub\libs\BasePermission
STATE_DENY 0 humhub\libs\BasePermission

Property Details

$defaultAllowedGroups public property

Default allowed groups

public array $defaultAllowedGroups = [\humhub\modules\user\models\User::USERGROUP_SELF, \humhub\modules\user\models\User::USERGROUP_FRIEND]
$description protected property

Description of the permission

protected string $description null
$fixedGroups protected property

Default fixed groups

protected array $fixedGroups = [\humhub\modules\user\models\User::USERGROUP_SELF]
$moduleId protected property

Module id which belongs to the permission

protected string $moduleId 'user'
$title protected property

Title of the permission

protected string $title null

Method Details

__construct() public method

public void __construct ( $config = [] )
$config
getDefaultState() public method

Returns the default state of the permission.

The defaultState is either defined by setting $defaultState attribute or by overwriting the $defaultState by means of the configuration param 'defaultPermissions'.

If the $defaultState is set to denied, we can grant the permission for specific groups by defining the $defaultAllowedGroups array.

public integer getDefaultState ( $groupId )
$groupId
return integer

The default state