public function createPolicy(
        array $properties,
        array $policies = [],
        array $addAces = [],
        array $removeAces = [],
        OperationContextInterface $context = null
    ) {
        $newObjectId = $this->getSession()->createPolicy($properties, $this, $policies, $addAces, $removeAces);

        $policy = $this->getNewlyCreatedObject($newObjectId, $context);

        if ($policy === null) {
            return null;
        } elseif (!$policy instanceof PolicyInterface) {
            throw new CmisRuntimeException('Newly created object is not a policy! New id: ' . $policy->getId());
        }

        return $policy;
    }
public function createPolicy(
        array $properties,
        array $policies = [],
        array $addAces = [],
        array $removeAces = [],
        OperationContextInterface $context = null
    ) {
        $newObjectId = $this->getSession()->createPolicy($properties, $this, $policies, $addAces, $removeAces);

        $policy = $this->getNewlyCreatedObject($newObjectId, $context);

        if ($policy === null) {
            return null;
        } elseif (!$policy instanceof PolicyInterface) {
            throw new CmisRuntimeException('Newly created object is not a policy! New id: ' . $policy->getId());
        }

        return $policy;
    }
public function createPolicy ( array $ properties , array $ policies = [ ] , array $ addAces = [ ] , array $ removeAces = [ ] , OperationContextInterface $ context = null ) { $ newObjectId = $ this -> getSession ( ) -> createPolicy ( $ properties , $ this , $ policies , $ addAces , $ removeAces ) ; $ policy = $ this -> getNewlyCreatedObject ( $ newObjectId , $ context ) ; if ( $ policy === null ) { return null ; } elseif ( ! $ policy instanceof PolicyInterface ) { throw new CmisRuntimeException ( 'Newly created object is not a policy! New id: ' . $ policy -> getId ( ) ) ; } return $ policy ; }
Creates a new policy in this folder.

@param array $properties The property values that MUST be applied to the newly-created policy object.
@param PolicyInterface[] $policies A list of policy ids that MUST be applied to the newly-created policy object.
@param AceInterface[] $addAces A list of ACEs that MUST be added to the newly-created policy object, either
using the ACL from folderId if specified, or being applied if no folderId is specified.
@param AceInterface[] $removeAces A list of ACEs that MUST be removed from the newly-created policy object,
either using the ACL from folderId if specified, or being ignored if no folderId is specified.
@param OperationContextInterface|null $context
@return PolicyInterface|null the new policy object
@throws CmisRuntimeException Exception is thrown if the created object is not a policy
Creates a new policy in this folder .