src/Entity/XiboPermissions.php
public function setPermissions($entity, $objectId, $groupId, $view, $edit, $delete, $ownerId = null)
    {
        $this->getLogger()->info('Setting Permissions view ' . $view . ' edit ' . $edit . ' delete ' . $delete . ' for user group ID ' . $groupId . ' to Entity ' . $entity . ' with ID ' . $objectId);

        $this->entity = $entity;
        $this->objectId = $objectId;
        $this->groupId = $groupId;
        $this->view = $view;
        $this->edit = $edit;
        $this->delete = $delete;
        $this->ownerId = $ownerId;

        $response = $this->doPost('/user/permissions/' . $entity . '/' . $objectId, [
            'groupIds' => [
               $groupId => [
                   'view' => $view,
                   'edit' => $edit,
                   'delete' => $delete
               ]
           ],
            'ownerId' => $ownerId
        ]);

        return $this->hydrate($response);
    }
public function setPermissions($entity, $objectId, $groupId, $view, $edit, $delete, $ownerId = null)
    {
        $this->getLogger()->info('Setting Permissions view ' . $view . ' edit ' . $edit . ' delete ' . $delete . ' for user group ID ' . $groupId . ' to Entity ' . $entity . ' with ID ' . $objectId);

        $this->entity = $entity;
        $this->objectId = $objectId;
        $this->groupId = $groupId;
        $this->view = $view;
        $this->edit = $edit;
        $this->delete = $delete;
        $this->ownerId = $ownerId;

        $response = $this->doPost('/user/permissions/' . $entity . '/' . $objectId, [
            'groupIds' => [
               $groupId => [
                   'view' => $view,
                   'edit' => $edit,
                   'delete' => $delete
               ]
           ],
            'ownerId' => $ownerId
        ]);

        return $this->hydrate($response);
    }
public function setPermissions ( $ entity , $ objectId , $ groupId , $ view , $ edit , $ delete , $ ownerId = null ) { $ this -> getLogger ( ) -> info ( 'Setting Permissions view ' . $ view . ' edit ' . $ edit . ' delete ' . $ delete . ' for user group ID ' . $ groupId . ' to Entity ' . $ entity . ' with ID ' . $ objectId ) ; $ this -> entity = $ entity ; $ this -> objectId = $ objectId ; $ this -> groupId = $ groupId ; $ this -> view = $ view ; $ this -> edit = $ edit ; $ this -> delete = $ delete ; $ this -> ownerId = $ ownerId ; $ response = $ this -> doPost ( '/user/permissions/' . $ entity . '/' . $ objectId , [ 'groupIds' => [ $ groupId => [ 'view' => $ view , 'edit' => $ edit , 'delete' => $ delete ] ] , 'ownerId' => $ ownerId ] ) ; return $ this -> hydrate ( $ response ) ; }
Set permissions to specific entity.

@param string $entity The Name of the entity Campaign, DataSet, DayPart, DisplayGroup, Media, Notification, Page, Playlist, Region, Widget
@param int $objectId the ID of the object to return permissions for
@param int $groupId The group ID to which the permissions should be set for
@param int $view A flag indicating whether view permission should be granted
@param int $edit A flag indicating whether edit permission should be granted
@param int $delete A flag indicating whether delete permission should be granted
@param int $ownerId Change the owner of this item. Leave empty to keep the current owner
@return XiboPermissions
Set permissions to specific entity .