本文整理汇总了PHP中thebuggenie\core\entities\Issue::findIssuesByText方法的典型用法代码示例。如果您正苦于以下问题:PHP Issue::findIssuesByText方法的具体用法?PHP Issue::findIssuesByText怎么用?PHP Issue::findIssuesByText使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类thebuggenie\core\entities\Issue
的用法示例。
在下文中一共展示了Issue::findIssuesByText方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: runFindDuplicateIssue
public function runFindDuplicateIssue(framework\Request $request)
{
$status = 200;
$message = null;
if ($issue_id = $request['issue_id']) {
try {
$issue = entities\Issue::getB2DBTable()->selectById($issue_id);
} catch (\Exception $e) {
$status = 400;
$message = framework\Context::getI18n()->__('Could not find this issue');
}
} else {
$status = 400;
$message = framework\Context::getI18n()->__('Please provide an issue number');
}
$searchfor = $request['searchfor'];
if (mb_strlen(trim($searchfor)) < 3 && !is_numeric($searchfor)) {
$status = 400;
$message = framework\Context::getI18n()->__('Please enter something to search for (3 characters or more) %searchfor', array('searchfor' => $searchfor));
}
$this->getResponse()->setHttpStatus($status);
if ($status == 400) {
return $this->renderJSON(array('error' => $message));
}
list($issues, $count) = entities\Issue::findIssuesByText($searchfor, $this->selected_project);
return $this->renderJSON(array('content' => $this->getComponentHTML('main/findduplicateissues', array('issue' => $issue, 'issues' => $issues, 'count' => $count))));
}