Abstract Class lispa\amos\core\rules\BasicContentRule

Inheritancelispa\amos\core\rules\BasicContentRule » yii\rbac\Rule » yii\base\Object
Implementsyii\base\Configurable
Subclasseslispa\amos\admin\rules\DeactivateAccountRule, lispa\amos\admin\rules\UpdateProfileFacilitatorRule, lispa\amos\admin\rules\ValidateUserProfileWorkflowRule, lispa\amos\community\rules\ReadCommunityRule, lispa\amos\community\rules\workflow\CommunityWorkflowDraftRule, lispa\amos\core\rules\ReadContentRule, lispa\amos\core\rules\ToValidateWorkflowContentRule, lispa\amos\discussioni\rules\workflow\DiscussioniToValidateWorkflowRule, lispa\amos\documenti\rules\workflow\DocumentiToValidateWorkflowRule, lispa\amos\een\rules\EenExprOfInterestWorkflowClosedRule, lispa\amos\een\rules\workflow\EenExprOfInterestWorkflowSuspendedRule, lispa\amos\een\rules\workflow\EenExprOfInterestWorkflowTakenOverRule, lispa\amos\events\rules\workflow\EventsToValidateWorkflowRule, lispa\amos\news\rules\workflow\NewsToValidateWorkflowRule, lispa\amos\partnershipprofiles\rules\ChangePartPropExprsOfIntStatusRule, lispa\amos\partnershipprofiles\rules\DeleteFacilitatorOwnPartnershipProfilesRule, lispa\amos\partnershipprofiles\rules\DeleteOwnExprOfIntRule, lispa\amos\partnershipprofiles\rules\DeleteOwnPartnershipProfilesRule, lispa\amos\partnershipprofiles\rules\FacilitatorOwnPartnershipProfilesRule, lispa\amos\partnershipprofiles\rules\OwnExprOfIntRule, 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\UpdateFacilitatorOwnPartnershipProfilesRule, lispa\amos\partnershipprofiles\rules\UpdateOwnExprOfIntRule, lispa\amos\partnershipprofiles\rules\UpdateOwnPartnershipProfilesRule, lispa\amos\projectmanagement\rules\BasicProjectsUpdateDeleteRule, lispa\amos\projectmanagement\rules\ByCommunityRoleRule, lispa\amos\projectmanagement\rules\PartnerReferentByCommunityRoleRule, lispa\amos\projectmanagement\rules\ProjectManagerByCommunityRoleRule, lispa\amos\projectmanagement\rules\ProjectsDeleteRule, lispa\amos\projectmanagement\rules\ProjectsUpdateRule, lispa\amos\projectmanagement\rules\workflow\ProjectsModifyRequestWorkflowClosedRule, lispa\amos\projectmanagement\rules\workflow\ProjectsModifyRequestWorkflowRejectedRule, lispa\amos\projectmanagement\rules\workflow\ProjectsModifyRequestWorkflowTovalidateRule, lispa\amos\projectmanagement\rules\workflow\ProjectsModifyRequestWorkflowValidatedRule, lispa\amos\projectmanagement\rules\workflow\ProjectsValidatedWorkflowRule

Class BasicContentRule

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. lispa\amos\core\rules\BasicContentRule
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
ruleLogic() Implement in this method all rule logic. lispa\amos\core\rules\BasicContentRule

Protected Methods

Hide inherited methods

MethodDescriptionDefined By
instanceModel() lispa\amos\core\rules\BasicContentRule

Method Details

execute() public method

Executes the rule.

public 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 \lispa\amos\core\rules\CheckAccessInterface::checkAccess().

return boolean

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

instanceModel() protected method

protected mixed instanceModel ( $model, $modelId )
$model lispa\amos\core\record\Record
$modelId integer
ruleLogic() public abstract method

Implement in this method all rule logic.

public abstract boolean ruleLogic ( $user, $item, $params, $model )
$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 \lispa\amos\core\rules\CheckAccessInterface::checkAccess().

$model lispa\amos\core\record\Record