Abstract Class yii\rbac\Rule

Inheritanceyii\rbac\Rule » yii\base\Object
Implementsyii\base\Configurable
Subclasseslispa\amos\admin\rbac\UpdateOwnUserProfile, lispa\amos\admin\rules\DeactivateAccountRule, lispa\amos\admin\rules\DefaultFacilitatorOwnContentRule, lispa\amos\admin\rules\ShowCommunityManagerWidgetRule, lispa\amos\admin\rules\UpdateProfileFacilitatorRule, lispa\amos\admin\rules\ValidateUserProfileWorkflowRule, lispa\amos\admin\rules\ValidatedBasicUserRule, lispa\amos\comments\rules\DeleteOwnCommentReplyRule, lispa\amos\comments\rules\DeleteOwnCommentRule, lispa\amos\comments\rules\DeleteOwnContentCommentsRule, lispa\amos\comments\rules\UpdateOwnCommentReplyRule, lispa\amos\comments\rules\UpdateOwnCommentRule, lispa\amos\comments\rules\UpdateOwnContentCommentsRule, lispa\amos\community\rbac\UpdateOwnCommunityProfile, lispa\amos\community\rbac\UpdateOwnNetworkCommunity, lispa\amos\community\rules\AuthorRoleRule, lispa\amos\community\rules\CommunityManagerRoleRule, lispa\amos\community\rules\CreateSubcommunitiesRule, lispa\amos\community\rules\DeleteOwnCommunitiesRule, lispa\amos\community\rules\DeleteOwnCommunityRelationRule, lispa\amos\community\rules\EditorRoleRule, lispa\amos\community\rules\ReadCommunityRule, lispa\amos\community\rules\UpdateCommunitiesManagerRule, lispa\amos\community\rules\UpdateOwnCommunitiesRule, lispa\amos\community\rules\UpdateOwnWorkgroupsRule, lispa\amos\community\rules\ValidateSubcommunitiesRule, lispa\amos\community\rules\workflow\CommunityWorkflowDraftRule, lispa\amos\core\rules\BasicCommunityManagerRoleRule, lispa\amos\core\rules\BasicContentRule, lispa\amos\core\rules\DefaultOwnContentRule, lispa\amos\core\rules\ReadContentRule, lispa\amos\core\rules\ToValidateWorkflowContentRule, lispa\amos\core\rules\UserCreatorContentOnDomain, lispa\amos\core\rules\UserValidatorContentOnDomain, lispa\amos\core\rules\UserValidatorContentRule, lispa\amos\core\rules\ValidatorUpdateContentRule, lispa\amos\discussioni\rules\DeleteCommunityManagerDiscussioniRule, lispa\amos\discussioni\rules\DeleteFacilitatorOwnDiscussioniRule, lispa\amos\discussioni\rules\DeleteOwnDiscussioniCommentiRule, lispa\amos\discussioni\rules\DeleteOwnDiscussioniRisposteRule, lispa\amos\discussioni\rules\DeleteOwnDiscussioniRule, lispa\amos\discussioni\rules\UpdateFacilitatorOwnDiscussioniRule, lispa\amos\discussioni\rules\UpdateOwnDiscussioniCommentiRule, lispa\amos\discussioni\rules\UpdateOwnDiscussioniRisposteRule, lispa\amos\discussioni\rules\UpdateOwnDiscussioniRule, lispa\amos\discussioni\rules\workflow\DiscussioniToValidateWorkflowRule, lispa\amos\documenti\rules\DeleteCommunityManagerDocumentiRule, lispa\amos\documenti\rules\DeleteFacilitatorOwnDocumentiRule, lispa\amos\documenti\rules\DeleteOwnDocumentiRule, lispa\amos\documenti\rules\UpdateFacilitatorOwnDocumentiRule, lispa\amos\documenti\rules\UpdateOwnDocumentiRule, lispa\amos\documenti\rules\workflow\DocumentiToValidateWorkflowRule, lispa\amos\een\rules\EenExprOfInterestWorkflowClosedRule, lispa\amos\een\rules\ReadOwnEenExprOfInterestRule, lispa\amos\een\rules\UpdateOwnEenExprOfInterestRule, lispa\amos\een\rules\WidgetEenExprOfInterestOwnRule, lispa\amos\een\rules\workflow\EenExprOfInterestWorkflowSuspendedRule, lispa\amos\een\rules\workflow\EenExprOfInterestWorkflowTakenOverRule, lispa\amos\events\rules\DeleteCommunityManagerEventsRule, lispa\amos\events\rules\DeleteOwnEventsRule, lispa\amos\events\rules\UpdateOwnEventsRule, lispa\amos\events\rules\workflow\EventsToValidateWorkflowRule, lispa\amos\invitations\rules\ReadOwnInvitationRule, lispa\amos\invitations\rules\UpdateOwnInvitationRule, lispa\amos\news\rules\DeleteCommunityManagerNewsRule, lispa\amos\news\rules\DeleteFacilitatorOwnNewsRule, lispa\amos\news\rules\DeleteOwnNewsRule, lispa\amos\news\rules\UpdateFacilitatorOwnNewsRule, lispa\amos\news\rules\UpdateOwnNewsRule, lispa\amos\news\rules\workflow\NewsToValidateWorkflowRule, lispa\amos\partnershipprofiles\rules\ChangePartPropExprsOfIntStatusRule, lispa\amos\partnershipprofiles\rules\DeleteFacilitatorOwnExprOfIntRule, lispa\amos\partnershipprofiles\rules\DeleteFacilitatorOwnPartnershipProfilesRule, lispa\amos\partnershipprofiles\rules\DeleteOwnExprOfIntRule, lispa\amos\partnershipprofiles\rules\DeleteOwnPartnershipProfilesRule, lispa\amos\partnershipprofiles\rules\ExprsOfIntAllowedStatesRule, lispa\amos\partnershipprofiles\rules\FacilitatorOwnPartnershipProfilesRule, lispa\amos\partnershipprofiles\rules\OwnExprOfIntRule, lispa\amos\partnershipprofiles\rules\OwnFacilitatorExprOfIntRule, lispa\amos\partnershipprofiles\rules\OwnPartnershipProfileRule, lispa\amos\partnershipprofiles\rules\PartnershipProfilesCloseStatusRule, lispa\amos\partnershipprofiles\rules\PartnershipProfilesDraftStatusRule, lispa\amos\partnershipprofiles\rules\ReadAllExprOfIntRule, lispa\amos\partnershipprofiles\rules\ReadOwnExprOfIntRule, lispa\amos\partnershipprofiles\rules\UpdateFacilitatorOwnExprOfIntRule, lispa\amos\partnershipprofiles\rules\UpdateFacilitatorOwnPartnershipProfilesRule, lispa\amos\partnershipprofiles\rules\UpdateOwnExprOfIntRule, lispa\amos\partnershipprofiles\rules\UpdateOwnPartnershipProfilesRule, lispa\amos\projectmanagement\rules\BasicProjectsActivitiesRule, lispa\amos\projectmanagement\rules\BasicProjectsTasksRule, lispa\amos\projectmanagement\rules\BasicProjectsUpdateDeleteRule, lispa\amos\projectmanagement\rules\ByCommunityRoleRule, lispa\amos\projectmanagement\rules\PartnerReferentByCommunityRoleRule, lispa\amos\projectmanagement\rules\PmDeleteOwnCommunityRelationRule, lispa\amos\projectmanagement\rules\ProjectManagerByCommunityRoleRule, lispa\amos\projectmanagement\rules\ProjectsActivitiesCreateRule, lispa\amos\projectmanagement\rules\ProjectsActivitiesDeleteRule, lispa\amos\projectmanagement\rules\ProjectsActivitiesUpdateRule, lispa\amos\projectmanagement\rules\ProjectsCreateRule, lispa\amos\projectmanagement\rules\ProjectsDeleteRule, lispa\amos\projectmanagement\rules\ProjectsMeasureCreateRule, lispa\amos\projectmanagement\rules\ProjectsModifyRequestCommentsRule, lispa\amos\projectmanagement\rules\ProjectsModifyRequestCreateRule, lispa\amos\projectmanagement\rules\ProjectsModifyRequestIndexRule, lispa\amos\projectmanagement\rules\ProjectsModifyRequestUpdateRule, lispa\amos\projectmanagement\rules\ProjectsProgressCostsCreateRule, lispa\amos\projectmanagement\rules\ProjectsProgressCostsDeleteRule, lispa\amos\projectmanagement\rules\ProjectsProgressCostsReadRule, lispa\amos\projectmanagement\rules\ProjectsProgressCostsUpdateRule, lispa\amos\projectmanagement\rules\ProjectsProgressDetectionPeriodCreateRule, lispa\amos\projectmanagement\rules\ProjectsProgressDetectionPeriodDeleteRule, lispa\amos\projectmanagement\rules\ProjectsProgressDetectionPeriodReadRule, lispa\amos\projectmanagement\rules\ProjectsProgressDetectionPeriodUpdateRule, lispa\amos\projectmanagement\rules\ProjectsProgressStatementsCreateRule, lispa\amos\projectmanagement\rules\ProjectsProgressStatementsDeleteRule, lispa\amos\projectmanagement\rules\ProjectsProgressStatementsReadRule, lispa\amos\projectmanagement\rules\ProjectsProgressStatementsUpdateRule, lispa\amos\projectmanagement\rules\ProjectsTasksCreateRule, lispa\amos\projectmanagement\rules\ProjectsTasksDeleteRule, lispa\amos\projectmanagement\rules\ProjectsTasksUpdateRule, lispa\amos\projectmanagement\rules\ProjectsUpdateRule, lispa\amos\projectmanagement\rules\TaskOrganizationsMmRule, lispa\amos\projectmanagement\rules\workflow\ProjectsActivityProgressWorkflowConfirmedRule, lispa\amos\projectmanagement\rules\workflow\ProjectsActivityProgressWorkflowOneditRule, lispa\amos\projectmanagement\rules\workflow\ProjectsDetectionPeriodWorkflowClosedRule, lispa\amos\projectmanagement\rules\workflow\ProjectsDetectionPeriodWorkflowInprogressRule, lispa\amos\projectmanagement\rules\workflow\ProjectsDetectionPeriodWorkflowPlannedRule, lispa\amos\projectmanagement\rules\workflow\ProjectsModifyRequestWorkflowClosedRule, lispa\amos\projectmanagement\rules\workflow\ProjectsModifyRequestWorkflowOneditRule, lispa\amos\projectmanagement\rules\workflow\ProjectsModifyRequestWorkflowRejectedRule, lispa\amos\projectmanagement\rules\workflow\ProjectsModifyRequestWorkflowTovalidateRule, lispa\amos\projectmanagement\rules\workflow\ProjectsModifyRequestWorkflowValidatedRule, lispa\amos\projectmanagement\rules\workflow\ProjectsValidatedWorkflowRule, lispa\amos\seo\rules\SeoDataRule, lispa\amos\translation\rules\CanTranslateRule, lispa\amos\videoconference\rules\JoinOwnVideoconference, lispa\amos\videoconference\rules\UpdateOwnVideoconference
Available since version2.0
Source Code https://github.com/yiisoft/yii2/blob/master/framework/rbac/Rule.php

Rule represents a business constraint that may be associated with a role, permission or assignment.

For more details and usage information on Rule, see the guide article on security authorization.

Public Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$createdAt integer UNIX timestamp representing the rule creation time yii\rbac\Rule
$name string Name of the rule yii\rbac\Rule
$updatedAt integer UNIX timestamp representing the rule updating time yii\rbac\Rule

Public Methods

Hide inherited methods

MethodDescriptionDefined By
__call() Calls the named method which is not a class method. yii\base\Object
__construct() Constructor. yii\base\Object
__get() Returns the value of an object property. yii\base\Object
__isset() Checks if a property is set, i.e. defined and not null. yii\base\Object
__set() Sets value of an object property. yii\base\Object
__unset() Sets an object property to null. yii\base\Object
canGetProperty() Returns a value indicating whether a property can be read. yii\base\Object
canSetProperty() Returns a value indicating whether a property can be set. yii\base\Object
className() Returns the fully qualified name of this class. yii\base\Object
execute() Executes the rule. yii\rbac\Rule
hasMethod() Returns a value indicating whether a method is defined. yii\base\Object
hasProperty() Returns a value indicating whether a property is defined. yii\base\Object
init() Initializes the object. yii\base\Object

Property Details

$createdAt public property

UNIX timestamp representing the rule creation time

public integer $createdAt null
$name public property

Name of the rule

public string $name null
$updatedAt public property

UNIX timestamp representing the rule updating time

public integer $updatedAt null

Method Details

execute() public abstract method

Executes the rule.

public abstract boolean execute ( $user, $item, $params )
$user string|integer

The user ID. This should be either an integer or a string representing the unique identifier of a user. See yii\web\User::$id.

$item yii\rbac\Item

The role or permission that this rule is associated with

$params array

Parameters passed to yii\rbac\CheckAccessInterface::checkAccess().

return boolean

A value indicating whether the rule permits the auth item it is associated with.