deleteSurveyPage - Delete a survey page

@param int $surveyId - The survey to get the page from
@param int $pageId - The page to delete

@return @see Client::sendRequest
778793
public function deleteSurveyPage($surveyId, $pageId)
	{
		return $this->sendRequest(
			$this->createRequest('DELETE', sprintf('surveys/%d/pages/%d', $surveyId, $pageId))
		);
	}
630908
public function getSurveyResponse($surveyId, $responseId, $detailed = false, array $filters = [])
	{
		if ($detailed) {
			return $this->sendRequest(
				$this->createRequest('GET', sprintf('surveys/%s/responses/%s/details', $surveyId, $responseId), [ 
					'query' => $filters 
				])
			);
		} else {
			return $this->sendRequest(
				$this->createRequest('GET', sprintf('surveys/%s/responses/%s', $surveyId, $responseId), [ 
					'query' => $filters 
				])
			);
		}
	}
751448
public function delete($appId)
    {
        $response = $this->client->delete(
            $this->uri . $appId . '/',
            []
        );

        return new ResponseDelete($response->getStatusCode());
    }
78737
public function removeRole($roleId, $pageId = 0)
    {
        $this->roles()
            ->wherePivot(self::PIVOT_ATTR_ROLE_ID, '=', $roleId)
            ->wherePivot(self::PIVOT_ATTR_PAGE_ID, '=', $pageId)
            ->detach();

        return $this;
    }
1280915
public function getNumberOfAnswers($surveyId) {
        $fields['tokenCount'] = 'COUNT(DISTINCT gto_id_token)';
        $select               = $this->loader->getTracker()->getTokenSelect($fields)->andReceptionCodes([]);
        $select->forSurveyId($surveyId)
                ->onlySucces()
                ->onlyCompleted();
        $row                  = $select->fetchRow();
        return sprintf($this->_('Answered surveys: %d.'), $row['tokenCount']);
    }
521875
public function clearByPageId(int $pageId)
    {
        $cache = $this->get();
        $cacheEntries = \array_keys($cache->getByTag('pageId_' . $pageId));
        foreach ($cacheEntries as $cacheEntry) {
            $cache->remove($cacheEntry);
        }
    }
348775
public int remove(CmsUUID id) {

        CmsDetailPageInfo info = m_infoById.get(id);
        if (info == null) {
            throw new IllegalArgumentException();
        }
        String type = info.getType();
        List<CmsDetailPageInfo> infos = m_map.get(type);
        int pos = infos.indexOf(info);
        infos.remove(pos);
        m_infoById.remove(id);
        return pos;

    }
19866
public function getCollectorsForSurvey($surveyId, array $filters = [])
	{
		return $this->sendRequest(
			$this->createRequest('GET', sprintf('surveys/%s/collectors', $surveyId), [ 
				'query' => $filters 
			])
		);
	}
568798
public function delete($id)
    {
        $this->_write(sprintf('delete %d', $id));
        $status = $this->_read();

        switch ($status) {
            case 'DELETED':
                return true;
            case 'NOT_FOUND':
                return false;
            default:
                throw new ServerException('Delete error: '.$status);
        }
    }
874732
public function createCollectorForSurvey($surveyId, array $data = [])
	{
		return $this->sendRequest(
			$this->createRequest('POST', sprintf('surveys/%s/collectors', $surveyId), [], $data)
		);
	}
934992
public function update($pageId)
    {
        // get the root line of the page, every parent page could be a Mount Page source
        /** @var $pageSelect PageRepository */
        $pageSelect = GeneralUtility::makeInstance(PageRepository::class);
        $rootLineArray = $pageSelect->getRootLine($pageId);

        $currentPage = array_shift($rootLineArray);
        $currentPageUid = (int)$currentPage['uid'];

        if (empty($rootLineArray) && $currentPageUid === 0) {
            return;
        }

        /** @var $rootLine Rootline */
        $rootLine = GeneralUtility::makeInstance(Rootline::class, /** @scrutinizer ignore-type */ $rootLineArray);
        $rootLineParentPageIds = array_map('intval', $rootLine->getParentPageIds());
        $destinationMountProperties = $this->pagesRepository->findMountPointPropertiesByPageIdOrByRootLineParentPageIds($currentPageUid, $rootLineParentPageIds);

        if (empty($destinationMountProperties)) {
            return;
        }

        foreach ($destinationMountProperties as $destinationMount) {
            $this->addPageToMountingSiteIndexQueue($pageId, $destinationMount);
        }
    }
935343
public function delete($notificationId)
    {
        return $this->sendRequest(
            self::METHOD_DELETE,
            str_replace(':notification_id', $notificationId, self::$endPoints['delete'])
        );
    }
490390
public function getTracksBySurvey($surveyId)
    {
        $cacheId = __CLASS__ . '_' . __FUNCTION__ . '_' . $surveyId;

        if ($results = $this->cache->load($cacheId)) {
            return $results;
        }

        $select = $this->db->select();
        $select->from('gems__tracks', array('gtr_id_track', 'gtr_track_name'))
                ->joinInner('gems__rounds', 'gtr_id_track = gro_id_track', array())
                ->where("gro_id_survey = ?", $surveyId)
                ->where("gtr_active = 1")
                ->where("gro_active = 1")
                ->order('gtr_track_name');

        $results = $this->db->fetchPairs($select);
        $this->cache->save($results, $cacheId, array('surveys', 'tracks'));
        return $results;
    }
51112
public function replaceSurveyPage($surveyId, $pageId, array $data = [])
	{
		return $this->sendRequest(
			$this->createRequest('PUT', sprintf('surveys/%d/pages/%d', $surveyId, $pageId), [], $data)
		);
	}
3112
public function delete($projectId)
    {
        $this->requireAdmin();

        $project = $this->projectStore->getById($projectId);
        $this->projectService->deleteProject($project);

        $response = new b8\Http\Response\RedirectResponse();
        $response->setHeader('Location', PHPCI_URL);
        return $response;
    }
1922
public function checkSurvey($sourceSurveyId, $surveyId, $userId)
    {
        $changed     = 0;
        $created     = false;
        $deleted     = false;
        $deletedFile = false;
        $survey      = $this->tracker->getSurvey($surveyId);

        // Get OpenRosa data
        if ($sourceSurveyId) {
            // Surveys in OpenRose
            $db = $this->getSourceDatabase();

            $select = $db->select();
            $select->from('gems__openrosaforms')
                    ->where('gof_id = ?', $sourceSurveyId);

            $openRosaSurvey = $db->fetchRow($select);
        } else {
            $openRosaSurvey = false;
        }

        if ($openRosaSurvey) {
            // Exists
            $values['gsu_survey_name']     = sprintf(
                    '%s [%s]',
                    $openRosaSurvey['gof_form_title'],
                    $openRosaSurvey['gof_form_version']
                    );
            $values['gsu_status']          = 'OK';
            $values['gsu_surveyor_active'] = $openRosaSurvey['gof_form_active'];

            if (!$surveyId) {
                // New
                $values['gsu_active']      = 0;
                $values['gsu_id_source']   = $this->getId();
                $values['gsu_surveyor_id'] = $sourceSurveyId;
                $created = true;
            }

            if (!$this->sourceFileExists($openRosaSurvey['gof_form_xml'])) {
                // No longer exists
                $values['gsu_surveyor_active'] = 0;
                $values['gsu_status']          = 'Survey form XML was removed from directory.';
                $deletedFile = true;
            }


        } else {
            // No longer exists
            $values['gsu_surveyor_active'] = 0;
            $values['gsu_status']          = 'Survey was removed from source.';

            $deleted = true;
        }

        $changed = $survey->saveSurvey($values, $userId);

        if (! $changed) {
            return;
        }

        if ($deleted) {
            $message = $this->_('The \'%s\' survey is no longer active. The survey was removed from OpenRosa!');

        } elseif ($deletedFile) {
            $message = $this->_('The \'%s\' survey is no longer active. The survey XML file was removed from its directory!');

        } elseif ($created) {
            $message = $this->_('Imported the \'%s\' survey.');

        } else {
            $message = $this->_('Updated the \'%s\' survey.');
        }

        return sprintf($message, $survey->getName());;
    }
273107
public function recordDelete($recordId = 0, $domainId = 0) {
        //设置URL扩展
        $this->setUrlExtend("$recordId/$domainId");
        //设置请求的方法
        $this->setMethod('DELETE');
        //初始化参数
        $this->initParam();
        //获取返回值
        return $this->response();
    }