Changeset View
Changeset View
Standalone View
Standalone View
src/applications/search/engine/PhabricatorSearchEngineAPIMethod.php
Show First 20 Lines • Show All 190 Lines • ▼ Show 20 Lines | |||||
} | } | ||||
``` | ``` | ||||
These builtin orders are available: | These builtin orders are available: | ||||
EOTEXT | EOTEXT | ||||
); | ); | ||||
$head_builtin = pht('Builtin Order'); | $head_builtin = pht('Builtin Order'); | ||||
$head_description = pht('Description'); | $head_label = pht('Label'); | ||||
$head_columns = pht('Columns'); | $head_columns = pht('Columns'); | ||||
$orders = $query->getBuiltinOrders(); | $orders = $query->getBuiltinOrders(); | ||||
$table = array(); | $table = array(); | ||||
$table[] = "| {$head_builtin} | {$head_description} | {$head_columns} |"; | $table[] = "| {$head_builtin} | {$head_label} | {$head_columns} |"; | ||||
$table[] = '|-----------------|---------------------|-----------------|'; | $table[] = '|-----------------|---------------------|-----------------|'; | ||||
foreach ($orders as $key => $order) { | foreach ($orders as $key => $order) { | ||||
$name = $order['name']; | $name = $order['name']; | ||||
$columns = implode(', ', $order['vector']); | $columns = implode(', ', $order['vector']); | ||||
$table[] = "| `{$key}` | {$name} | {$columns} |"; | $table[] = "| `{$key}` | {$name} | {$columns} |"; | ||||
} | } | ||||
$table = implode("\n", $table); | $table = implode("\n", $table); | ||||
$out[] = $table; | $out[] = $table; | ||||
▲ Show 20 Lines • Show All 91 Lines • ▼ Show 20 Lines | |||||
This result structure is standardized across all search methods, but the | This result structure is standardized across all search methods, but the | ||||
available fields differ from application to application. | available fields differ from application to application. | ||||
These are the fields available on this object type: | These are the fields available on this object type: | ||||
EOTEXT | EOTEXT | ||||
); | ); | ||||
$head_key = pht('Key'); | |||||
$head_type = pht('Type'); | |||||
$head_description = pht('Description'); | |||||
$specs = $engine->getAllConduitFieldSpecifications(); | $specs = $engine->getAllConduitFieldSpecifications(); | ||||
$table = array(); | $table = array(); | ||||
$table[] = "| {$head_key} | {$head_type} | {$head_description} |"; | $table[] = "| {$head_key} | {$head_type} | {$head_description} |"; | ||||
$table[] = '|-------------|--------------|---------------------|'; | $table[] = '|-------------|--------------|---------------------|'; | ||||
foreach ($specs as $key => $spec) { | foreach ($specs as $key => $spec) { | ||||
$type = idx($spec, 'type'); | $type = idx($spec, 'type'); | ||||
$description = idx($spec, 'description'); | $description = idx($spec, 'description'); | ||||
▲ Show 20 Lines • Show All 74 Lines • Show Last 20 Lines |