/** * Update access control profile by id * * @action update * @param int $id * @param KalturaAccessControlProfile $accessControlProfile * @return KalturaAccessControlProfile * * @throws KalturaErrors::ACCESS_CONTROL_ID_NOT_FOUND */ function updateAction($id, KalturaAccessControlProfile $accessControlProfile) { $dbAccessControl = accessControlPeer::retrieveByPK($id); if (!$dbAccessControl) { throw new KalturaAPIException(KalturaErrors::ACCESS_CONTROL_ID_NOT_FOUND, $id); } $accessControlProfile->toUpdatableObject($dbAccessControl); $dbAccessControl->save(); $accessControlProfile = new KalturaAccessControlProfile(); $accessControlProfile->fromObject($dbAccessControl); return $accessControlProfile; }