Changeset View
Changeset View
Standalone View
Standalone View
src/applications/search/engine/PhabricatorSearchEngineAPIMethod.php
Show First 20 Lines • Show All 192 Lines • ▼ Show 20 Lines | EOTEXT | ||||
$constant_lists = array(); | $constant_lists = array(); | ||||
$rows = array(); | $rows = array(); | ||||
foreach ($fields as $field) { | foreach ($fields as $field) { | ||||
$key = $field->getConduitKey(); | $key = $field->getConduitKey(); | ||||
$label = $field->getLabel(); | $label = $field->getLabel(); | ||||
$constants = $field->newConduitConstants(); | $constants = $field->newConduitConstants(); | ||||
$show_table = false; | |||||
$type_object = $field->getConduitParameterType(); | $type_object = $field->getConduitParameterType(); | ||||
if ($type_object) { | if ($type_object) { | ||||
$type = $type_object->getTypeName(); | $type = $type_object->getTypeName(); | ||||
$description = $field->getDescription(); | $description = $field->getDescription(); | ||||
if ($constants) { | if ($constants) { | ||||
$description = array( | $description = array( | ||||
$description, | $description, | ||||
' ', | ' ', | ||||
phutil_tag('em', array(), pht('(See table below.)')), | phutil_tag('em', array(), pht('(See table below.)')), | ||||
); | ); | ||||
$show_table = true; | |||||
} | } | ||||
} else { | } else { | ||||
$type = null; | $type = null; | ||||
$description = phutil_tag('em', array(), pht('Not supported.')); | $description = phutil_tag('em', array(), pht('Not supported.')); | ||||
} | } | ||||
$rows[] = array( | $rows[] = array( | ||||
$key, | $key, | ||||
$label, | $label, | ||||
$type, | $type, | ||||
$description, | $description, | ||||
); | ); | ||||
if ($constants) { | if ($show_table) { | ||||
$constant_lists[] = $this->newRemarkupDocumentationView( | $constant_lists[] = $this->newRemarkupDocumentationView( | ||||
pht( | pht( | ||||
'Constants supported by the `%s` constraint:', | 'Constants supported by the `%s` constraint:', | ||||
'statuses')); | $key)); | ||||
$constants_rows = array(); | $constants_rows = array(); | ||||
foreach ($constants as $constant) { | foreach ($constants as $constant) { | ||||
if ($constant->getIsDeprecated()) { | if ($constant->getIsDeprecated()) { | ||||
$icon = id(new PHUIIconView()) | $icon = id(new PHUIIconView()) | ||||
->setIcon('fa-exclamation-triangle', 'red'); | ->setIcon('fa-exclamation-triangle', 'red'); | ||||
} else { | } else { | ||||
$icon = null; | $icon = null; | ||||
▲ Show 20 Lines • Show All 402 Lines • Show Last 20 Lines |