Changeset View
Changeset View
Standalone View
Standalone View
src/applications/search/engine/PhabricatorSearchEngineAPIMethod.php
Show First 20 Lines • Show All 148 Lines • ▼ Show 20 Lines | EOTEXT | ||||
$fields = $engine->getSearchFieldsForConduit(); | $fields = $engine->getSearchFieldsForConduit(); | ||||
$table = array(); | $table = array(); | ||||
$table[] = "| {$head_key} | {$head_label} | {$head_type} | {$head_desc} |"; | $table[] = "| {$head_key} | {$head_label} | {$head_type} | {$head_desc} |"; | ||||
$table[] = '|-------------|---------------|--------------|--------------|'; | $table[] = '|-------------|---------------|--------------|--------------|'; | ||||
$table[] = "| `ids` | **IDs** | `list<int>` | {$desc_ids} |"; | $table[] = "| `ids` | **IDs** | `list<int>` | {$desc_ids} |"; | ||||
$table[] = "| `phids` | **PHIDs** | `list<phid>` | {$desc_phids} |"; | $table[] = "| `phids` | **PHIDs** | `list<phid>` | {$desc_phids} |"; | ||||
foreach ($fields as $field) { | foreach ($fields as $field) { | ||||
$key = $field->getKeyForConduit(); | $key = $field->getConduitKey(); | ||||
$label = $field->getLabel(); | $label = $field->getLabel(); | ||||
$type_object = $field->getConduitParameterType(); | |||||
if ($type_object) { | |||||
$type = '`'.$type_object->getTypeName().'`'; | |||||
// TODO: Support generating and surfacing this information. | // TODO: Support generating and surfacing this information. | ||||
$type = pht('TODO'); | |||||
$description = pht('TODO'); | $description = pht('TODO'); | ||||
} else { | |||||
$type = ''; | |||||
$description = '//'.pht('Not Supported').'//'; | |||||
} | |||||
$table[] = "| `{$key}` | **{$label}** | `{$type}` | {$description}"; | $table[] = "| `{$key}` | **{$label}** | {$type} | {$description}"; | ||||
} | } | ||||
$table = implode("\n", $table); | $table = implode("\n", $table); | ||||
$out[] = $table; | $out[] = $table; | ||||
$out[] = pht(<<<EOTEXT | $out[] = pht(<<<EOTEXT | ||||
Result Order | Result Order | ||||
------------ | ------------ | ||||
▲ Show 20 Lines • Show All 217 Lines • Show Last 20 Lines |