eZ\Publish\Core\Repository\Values\User\PolicyUpdateStruct::addLimitation PHP Method

addLimitation() public method

Adds a limitation to the policy - if a Limitation exists with the same identifier the existing limitation is replaced.
public addLimitation ( eZ\Publish\API\Repository\Values\User\Limitation $limitation )
$limitation eZ\Publish\API\Repository\Values\User\Limitation
    public function addLimitation(Limitation $limitation)
    {
        $limitationIdentifier = $limitation->getIdentifier();
        $this->limitations[$limitationIdentifier] = $limitation;
    }