public function edit($channelId, $typeId, $type, $allow = null, $deny = null)
    {
        $current = $this->show($channelId, $typeId, $type);
        if (is_null($current)) {
            return $this->create($channelId, $typeId, $type, $allow, $deny);
        }
        if (is_null($allow)) {
            $allow = $current['allow'];
        }
        if (is_null($deny)) {
            $deny = $current['deny'];
        }
        return $this->request('PUT', 'channels/' . $channelId . '/permissions/' . $typeId, [
            'json' => [
                'type' => $current['type'],
                'id' => $current['id'],
                'allow' => $allow,
                'deny' => $deny
            ]
        ]);
    }
public function edit($channelId, $typeId, $type, $allow = null, $deny = null)
    {
        $current = $this->show($channelId, $typeId, $type);
        if (is_null($current)) {
            return $this->create($channelId, $typeId, $type, $allow, $deny);
        }
        if (is_null($allow)) {
            $allow = $current['allow'];
        }
        if (is_null($deny)) {
            $deny = $current['deny'];
        }
        return $this->request('PUT', 'channels/' . $channelId . '/permissions/' . $typeId, [
            'json' => [
                'type' => $current['type'],
                'id' => $current['id'],
                'allow' => $allow,
                'deny' => $deny
            ]
        ]);
    }
public function edit ( $ channelId , $ typeId , $ type , $ allow = null , $ deny = null ) { $ current = $ this -> show ( $ channelId , $ typeId , $ type ) ; if ( is_null ( $ current ) ) { return $ this -> create ( $ channelId , $ typeId , $ type , $ allow , $ deny ) ; } if ( is_null ( $ allow ) ) { $ allow = $ current [ 'allow' ] ; } if ( is_null ( $ deny ) ) { $ deny = $ current [ 'deny' ] ; } return $ this -> request ( 'PUT' , 'channels/' . $ channelId . '/permissions/' . $ typeId , [ 'json' => [ 'type' => $ current [ 'type' ] , 'id' => $ current [ 'id' ] , 'allow' => $ allow , 'deny' => $ deny ] ] ) ; }
Edit channel permissions.

@param string $channelId
@param string $typeId
@param string $type
@param null   $allow
@param null   $deny
@return array
Edit channel permissions .