Differential D17372 Diff 41774 src/applications/transactions/typeahead/PhabricatorEditEngineDatasource.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/transactions/typeahead/PhabricatorEditEngineDatasource.php
| Show All 24 Lines | final class PhabricatorEditEngineDatasource | ||||
| } | } | ||||
| private function buildResults() { | private function buildResults() { | ||||
| $query = id(new PhabricatorEditEngineConfigurationQuery()); | $query = id(new PhabricatorEditEngineConfigurationQuery()); | ||||
| $forms = $this->executeQuery($query); | $forms = $this->executeQuery($query); | ||||
| $results = array(); | $results = array(); | ||||
| foreach ($forms as $form) { | foreach ($forms as $form) { | ||||
| $create_uri = $form->getCreateURI(); | |||||
| if (!$create_uri) { | |||||
| continue; | |||||
| } | |||||
| if ($form->getID()) { | if ($form->getID()) { | ||||
| $key = $form->getEngineKey().'/'.$form->getID(); | $key = $form->getEngineKey().'/'.$form->getID(); | ||||
| } else { | } else { | ||||
| $key = $form->getEngineKey().'/'.$form->getBuiltinKey(); | $key = $form->getEngineKey().'/'.$form->getBuiltinKey(); | ||||
| } | } | ||||
| $result = id(new PhabricatorTypeaheadResult()) | $result = id(new PhabricatorTypeaheadResult()) | ||||
| ->setName($form->getName()) | ->setName($form->getName()) | ||||
| ->setPHID($key) | ->setPHID($key) | ||||
| ->setIcon($form->getIcon()); | ->setIcon($form->getIcon()); | ||||
| if ($form->getIsDisabled()) { | if ($form->getIsDisabled()) { | ||||
| $result->setClosed(pht('Archived')); | $result->setClosed(pht('Archived')); | ||||
| } | } | ||||
| Show All 16 Lines | |||||