public function deletePolicy(Policy $policy)
    {
        $returnValue = $this->service->deletePolicy($policy);
        $this->signalDispatcher->emit(
            new RemovePolicySignal(
                array(
                    'roleId' => $policy->roleId,
                    'policyId' => $policy->id,
                )
            )
        );

        return $returnValue;
    }
public function deletePolicy(Policy $policy)
    {
        $returnValue = $this->service->deletePolicy($policy);
        $this->signalDispatcher->emit(
            new RemovePolicySignal(
                array(
                    'roleId' => $policy->roleId,
                    'policyId' => $policy->id,
                )
            )
        );

        return $returnValue;
    }
public function deletePolicy ( Policy $ policy ) { $ returnValue = $ this -> service -> deletePolicy ( $ policy ) ; $ this -> signalDispatcher -> emit ( new RemovePolicySignal ( array ( 'roleId' => $ policy -> roleId , 'policyId' => $ policy -> id , ) ) ) ; return $ returnValue ; }
Delete a policy.

@deprecated since 6.0, use {@link removePolicyByRoleDraft()} instead.

@throws \eZ\Publish\API\Repository\Exceptions\UnauthorizedException if the authenticated user is not allowed to remove a policy

@param \eZ\Publish\API\Repository\Values\User\Policy $policy the policy to delete
Delete a policy .