当前位置: 首页>>代码示例>>PHP>>正文


PHP PhabricatorSavedQuery::getParameter方法代码示例

本文整理汇总了PHP中PhabricatorSavedQuery::getParameter方法的典型用法代码示例。如果您正苦于以下问题:PHP PhabricatorSavedQuery::getParameter方法的具体用法?PHP PhabricatorSavedQuery::getParameter怎么用?PHP PhabricatorSavedQuery::getParameter使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PhabricatorSavedQuery的用法示例。


在下文中一共展示了PhabricatorSavedQuery::getParameter方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: buildSearchForm

 public function buildSearchForm(AphrontFormView $form, PhabricatorSavedQuery $saved_query)
 {
     $author_phids = $saved_query->getParameter('authorPHIDs', array());
     $answerer_phids = $saved_query->getParameter('answererPHIDs', array());
     $status = $saved_query->getParameter('status', PonderQuestionStatus::STATUS_OPEN);
     $form->appendControl(id(new AphrontFormTokenizerControl())->setDatasource(new PhabricatorPeopleDatasource())->setName('authors')->setLabel(pht('Authors'))->setValue($author_phids))->appendControl(id(new AphrontFormTokenizerControl())->setDatasource(new PhabricatorPeopleDatasource())->setName('answerers')->setLabel(pht('Answered By'))->setValue($answerer_phids))->appendChild(id(new AphrontFormSelectControl())->setLabel(pht('Status'))->setName('status')->setValue($status)->setOptions(PonderQuestionStatus::getQuestionStatusMap()));
 }
开发者ID:kristain,项目名称:phabricator,代码行数:7,代码来源:PonderQuestionSearchEngine.php

示例2: buildSearchForm

 public function buildSearchForm(AphrontFormView $form, PhabricatorSavedQuery $saved_query)
 {
     $phids = $saved_query->getParameter('authorPHIDs', array());
     $author_handles = id(new PhabricatorHandleQuery())->setViewer($this->requireViewer())->withPHIDs($phids)->execute();
     $upcoming = $saved_query->getParameter('upcoming');
     $form->appendChild(id(new AphrontFormTokenizerControl())->setDatasource(new PhabricatorPeopleDatasource())->setName('authors')->setLabel(pht('Authors'))->setValue($author_handles))->appendChild(id(new AphrontFormCheckboxControl())->addCheckbox('upcoming', 1, pht('Show only countdowns that are still counting down.'), $upcoming));
 }
开发者ID:denghp,项目名称:phabricator,代码行数:7,代码来源:PhabricatorCountdownSearchEngine.php

示例3: buildSearchForm

 public function buildSearchForm(AphrontFormView $form, PhabricatorSavedQuery $saved_query)
 {
     $user_phids = $saved_query->getParameter('userPHIDs', array());
     $ended = $saved_query->getParameter('ended', PhrequentUserTimeQuery::ENDED_ALL);
     $order = $saved_query->getParameter('order', PhrequentUserTimeQuery::ORDER_ENDED_DESC);
     $form->appendControl(id(new AphrontFormTokenizerControl())->setDatasource(new PhabricatorPeopleDatasource())->setName('users')->setLabel(pht('Users'))->setValue($user_phids))->appendChild(id(new AphrontFormSelectControl())->setLabel(pht('Ended'))->setName('ended')->setValue($ended)->setOptions(PhrequentUserTimeQuery::getEndedSearchOptions()))->appendChild(id(new AphrontFormSelectControl())->setLabel(pht('Order'))->setName('order')->setValue($order)->setOptions(PhrequentUserTimeQuery::getOrderSearchOptions()));
 }
开发者ID:hrb518,项目名称:phabricator,代码行数:7,代码来源:PhrequentSearchEngine.php

示例4: buildSearchForm

 public function buildSearchForm(AphrontFormView $form, PhabricatorSavedQuery $saved_query)
 {
     $author_phids = $saved_query->getParameter('authorPHIDs', array());
     $voted = $saved_query->getParameter('voted', false);
     $statuses = $saved_query->getParameter('statuses', array());
     $form->appendControl(id(new AphrontFormTokenizerControl())->setDatasource(new PhabricatorPeopleDatasource())->setName('authors')->setLabel(pht('Authors'))->setValue($author_phids))->appendChild(id(new AphrontFormCheckboxControl())->addCheckbox('voted', 1, pht("Show only polls I've voted in."), $voted))->appendChild(id(new AphrontFormCheckboxControl())->setLabel(pht('Status'))->addCheckbox('statuses[]', 'open', pht('Open'), in_array('open', $statuses))->addCheckbox('statuses[]', 'closed', pht('Closed'), in_array('closed', $statuses)));
 }
开发者ID:kristain,项目名称:phabricator,代码行数:7,代码来源:PhabricatorSlowvoteSearchEngine.php

示例5: buildSearchForm

 public function buildSearchForm(AphrontFormView $form, PhabricatorSavedQuery $saved_query)
 {
     $author_phids = $saved_query->getParameter('authorPHIDs', array());
     $content_type = $saved_query->getParameter('contentType');
     $rule_type = $saved_query->getParameter('ruleType');
     $form->appendControl(id(new AphrontFormTokenizerControl())->setDatasource(new PhabricatorPeopleDatasource())->setName('authors')->setLabel(pht('Authors'))->setValue($author_phids))->appendChild(id(new AphrontFormSelectControl())->setName('contentType')->setLabel(pht('Content Type'))->setValue($content_type)->setOptions($this->getContentTypeOptions()))->appendChild(id(new AphrontFormSelectControl())->setName('ruleType')->setLabel(pht('Rule Type'))->setValue($rule_type)->setOptions($this->getRuleTypeOptions()))->appendChild(id(new AphrontFormSelectControl())->setName('disabled')->setLabel(pht('Rule Status'))->setValue($this->getBoolFromQuery($saved_query, 'disabled'))->setOptions(array('' => pht('Show Enabled and Disabled Rules'), 'false' => pht('Show Only Enabled Rules'), 'true' => pht('Show Only Disabled Rules'))));
 }
开发者ID:kristain,项目名称:phabricator,代码行数:7,代码来源:HeraldRuleSearchEngine.php

示例6: buildSearchForm

 public function buildSearchForm(AphrontFormView $form, PhabricatorSavedQuery $saved_query)
 {
     $user_phids = $saved_query->getParameter('userPHIDs', array());
     $proj_phids = $saved_query->getParameter('projectPHIDs', array());
     $viewer_projects = $saved_query->getParameter('viewerProjects');
     $form->appendControl(id(new AphrontFormTokenizerControl())->setDatasource(new PhabricatorPeopleDatasource())->setName('users')->setLabel(pht('Include Users'))->setValue($user_phids))->appendControl(id(new AphrontFormTokenizerControl())->setDatasource(new PhabricatorProjectDatasource())->setName('projectPHIDs')->setLabel(pht('Include Projects'))->setValue($proj_phids))->appendChild(id(new AphrontFormCheckboxControl())->addCheckbox('viewerProjects', 1, pht('Include stories about projects I am a member of.'), $viewer_projects));
 }
开发者ID:hrb518,项目名称:phabricator,代码行数:7,代码来源:PhabricatorFeedSearchEngine.php

示例7: buildSearchForm

 public function buildSearchForm(AphrontFormView $form, PhabricatorSavedQuery $saved)
 {
     $form->appendChild(id(new AphrontFormTextControl())->setLabel(pht('Name Contains'))->setName('nameContains')->setValue($saved->getParameter('nameContains')));
     $is_stable = $saved->getParameter('isStable');
     $is_unstable = $saved->getParameter('isUnstable');
     $is_deprecated = $saved->getParameter('isDeprecated');
     $form->appendChild(id(new AphrontFormCheckboxControl())->setLabel('Stability')->addCheckbox('isStable', 1, hsprintf('<strong>%s</strong>: %s', pht('Stable Methods'), pht('Show established API methods with stable interfaces.')), $is_stable)->addCheckbox('isUnstable', 1, hsprintf('<strong>%s</strong>: %s', pht('Unstable Methods'), pht('Show new methods which are subject to change.')), $is_unstable)->addCheckbox('isDeprecated', 1, hsprintf('<strong>%s</strong>: %s', pht('Deprecated Methods'), pht('Show old methods which will be deleted in a future ' . 'version of Phabricator.')), $is_deprecated));
 }
开发者ID:NeoArmageddon,项目名称:phabricator,代码行数:8,代码来源:PhabricatorConduitSearchEngine.php

示例8: buildSearchForm

 public function buildSearchForm(AphrontFormView $form, PhabricatorSavedQuery $saved)
 {
     $auditor_phids = $saved->getParameter('auditorPHIDs', array());
     $commit_author_phids = $saved->getParameter('commitAuthorPHIDs', array());
     $audit_status = $saved->getParameter('auditStatus', null);
     $repository_phids = $saved->getParameter('repositoryPHIDs', array());
     $form->appendControl(id(new AphrontFormTokenizerControl())->setDatasource(new DiffusionAuditorDatasource())->setName('auditorPHIDs')->setLabel(pht('Auditors'))->setValue($auditor_phids))->appendControl(id(new AphrontFormTokenizerControl())->setDatasource(new PhabricatorPeopleDatasource())->setName('authors')->setLabel(pht('Commit Authors'))->setValue($commit_author_phids))->appendChild(id(new AphrontFormSelectControl())->setName('auditStatus')->setLabel(pht('Audit Status'))->setOptions($this->getAuditStatusOptions())->setValue($audit_status))->appendControl(id(new AphrontFormTokenizerControl())->setLabel(pht('Repositories'))->setName('repositoryPHIDs')->setDatasource(new DiffusionRepositoryDatasource())->setValue($repository_phids));
 }
开发者ID:fengshao0907,项目名称:phabricator,代码行数:8,代码来源:PhabricatorCommitSearchEngine.php

示例9: buildSearchForm

 public function buildSearchForm(AphrontFormView $form, PhabricatorSavedQuery $saved_query)
 {
     $phids = $saved_query->getParameter('authorPHIDs', array());
     $author_handles = id(new PhabricatorHandleQuery())->setViewer($this->requireViewer())->withPHIDs($phids)->execute();
     $explicit = $saved_query->getParameter('explicit');
     $form->appendChild(id(new AphrontFormTokenizerControl())->setDatasource(new PhabricatorPeopleDatasource())->setName('authors')->setLabel(pht('Authors'))->setValue($author_handles))->appendChild(id(new AphrontFormCheckboxControl())->addCheckbox('explicit', 1, pht('Show only manually uploaded files.'), $explicit));
     $this->buildDateRange($form, $saved_query, 'createdStart', pht('Created After'), 'createdEnd', pht('Created Before'));
 }
开发者ID:denghp,项目名称:phabricator,代码行数:8,代码来源:PhabricatorFileSearchEngine.php

示例10: buildSearchForm

 public function buildSearchForm(AphrontFormView $form, PhabricatorSavedQuery $saved_query)
 {
     $author_phids = $saved_query->getParameter('authorPHIDs', array());
     $answerer_phids = $saved_query->getParameter('answererPHIDs', array());
     $status = $saved_query->getParameter('status', PonderQuestionStatus::STATUS_OPEN);
     $phids = array_merge($author_phids, $answerer_phids);
     $handles = id(new PhabricatorHandleQuery())->setViewer($this->requireViewer())->withPHIDs($phids)->execute();
     $form->appendChild(id(new AphrontFormTokenizerControl())->setDatasource(new PhabricatorPeopleDatasource())->setName('authors')->setLabel(pht('Authors'))->setValue(array_select_keys($handles, $author_phids)))->appendChild(id(new AphrontFormTokenizerControl())->setDatasource(new PhabricatorPeopleDatasource())->setName('answerers')->setLabel(pht('Answered By'))->setValue(array_select_keys($handles, $answerer_phids)))->appendChild(id(new AphrontFormSelectControl())->setLabel(pht('Status'))->setName('status')->setValue($status)->setOptions(PonderQuestionStatus::getQuestionStatusMap()));
 }
开发者ID:denghp,项目名称:phabricator,代码行数:9,代码来源:PonderQuestionSearchEngine.php

示例11: buildSearchForm

 public function buildSearchForm(AphrontFormView $form, PhabricatorSavedQuery $saved_query)
 {
     $phids = $saved_query->getParameter('authorPHIDs', array());
     $author_handles = id(new PhabricatorHandleQuery())->setViewer($this->requireViewer())->withPHIDs($phids)->execute();
     $statuses = array('' => pht('Any Status'), 'closed' => pht('Closed'), 'open' => pht('Open'));
     $status = $saved_query->getParameter('statuses', array());
     $status = head($status);
     $form->appendChild(id(new AphrontFormTokenizerControl())->setDatasource(new PhabricatorPeopleDatasource())->setName('authors')->setLabel(pht('Authors'))->setValue($author_handles))->appendChild(id(new AphrontFormSelectControl())->setLabel(pht('Status'))->setName('status')->setOptions($statuses)->setValue($status));
 }
开发者ID:denghp,项目名称:phabricator,代码行数:9,代码来源:PholioMockSearchEngine.php

示例12: queryObjectNames

 private function queryObjectNames(PhabricatorSavedQuery $query, array $capabilities)
 {
     $request = $this->getRequest();
     $viewer = $request->getUser();
     $types = $query->getParameter('types');
     $match = $query->getParameter('query');
     $objects = id(new PhabricatorObjectQuery())->setViewer($viewer)->requireCapabilities($capabilities)->withTypes($query->getParameter('types'))->withNames(array($match))->execute();
     return mpull($objects, 'getPHID');
 }
开发者ID:rchicoli,项目名称:phabricator,代码行数:9,代码来源:PhabricatorSearchRelationshipSourceController.php

示例13: buildSearchForm

 public function buildSearchForm(AphrontFormView $form, PhabricatorSavedQuery $saved)
 {
     $auditor_phids = $saved->getParameter('auditorPHIDs', array());
     $commit_author_phids = $saved->getParameter('commitAuthorPHIDs', array());
     $audit_status = $saved->getParameter('auditStatus', null);
     $repository_phids = $saved->getParameter('repositoryPHIDs', array());
     $phids = array_mergev(array($auditor_phids, $commit_author_phids, $repository_phids));
     $handles = id(new PhabricatorHandleQuery())->setViewer($this->requireViewer())->withPHIDs($phids)->execute();
     $form->appendChild(id(new AphrontFormTokenizerControl())->setDatasource(new DiffusionAuditorDatasource())->setName('auditorPHIDs')->setLabel(pht('Auditors'))->setValue(array_select_keys($handles, $auditor_phids)))->appendChild(id(new AphrontFormTokenizerControl())->setDatasource(new PhabricatorPeopleDatasource())->setName('authors')->setLabel(pht('Commit Authors'))->setValue(array_select_keys($handles, $commit_author_phids)))->appendChild(id(new AphrontFormSelectControl())->setName('auditStatus')->setLabel(pht('Audit Status'))->setOptions($this->getAuditStatusOptions())->setValue($audit_status))->appendChild(id(new AphrontFormTokenizerControl())->setLabel(pht('Repositories'))->setName('repositoryPHIDs')->setDatasource(new DiffusionRepositoryDatasource())->setValue(array_select_keys($handles, $repository_phids)));
 }
开发者ID:denghp,项目名称:phabricator,代码行数:10,代码来源:PhabricatorCommitSearchEngine.php

示例14: buildSearchForm

 public function buildSearchForm(AphrontFormView $form, PhabricatorSavedQuery $saved_query)
 {
     $status = $saved_query->getParameter('status', '');
     $paneltype = $saved_query->getParameter('paneltype', '');
     $panel_types = PhabricatorDashboardPanelType::getAllPanelTypes();
     $panel_types = mpull($panel_types, 'getPanelTypeName', 'getPanelTypeKey');
     asort($panel_types);
     $panel_types = array('' => pht('(All Types)')) + $panel_types;
     $form->appendChild(id(new AphrontFormSelectControl())->setLabel(pht('Status'))->setName('status')->setValue($status)->setOptions(array('' => pht('(All Panels)'), 'active' => pht('Active Panels'), 'archived' => pht('Archived Panels'))))->appendChild(id(new AphrontFormSelectControl())->setLabel(pht('Panel Type'))->setName('paneltype')->setValue($paneltype)->setOptions($panel_types));
 }
开发者ID:hrb518,项目名称:phabricator,代码行数:10,代码来源:PhabricatorDashboardPanelSearchEngine.php

示例15: buildSearchForm

 public function buildSearchForm(AphrontFormView $form, PhabricatorSavedQuery $saved_query)
 {
     $creator_phids = $saved_query->getParameter('creatorPHIDs', array());
     $contributor_phids = $saved_query->getParameter('contributorPHIDs', array());
     $viewer_signature = $saved_query->getParameter('withViewerSignature');
     if (!$this->requireViewer()->getPHID()) {
         $viewer_signature = false;
     }
     $form->appendChild(id(new AphrontFormCheckboxControl())->addCheckbox('withViewerSignature', 1, pht('Show only documents I have signed.'), $viewer_signature)->setDisabled(!$this->requireViewer()->getPHID()))->appendControl(id(new AphrontFormTokenizerControl())->setDatasource(new PhabricatorPeopleDatasource())->setName('creators')->setLabel(pht('Creators'))->setValue($creator_phids))->appendControl(id(new AphrontFormTokenizerControl())->setDatasource(new PhabricatorPeopleDatasource())->setName('contributors')->setLabel(pht('Contributors'))->setValue($contributor_phids));
     $this->buildDateRange($form, $saved_query, 'createdStart', pht('Created After'), 'createdEnd', pht('Created Before'));
 }
开发者ID:andrewBackPlane,项目名称:phabricator,代码行数:11,代码来源:LegalpadDocumentSearchEngine.php


注:本文中的PhabricatorSavedQuery::getParameter方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。