Path: blob/master/src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldText.php
12242 views
<?php12final class PhabricatorStandardCustomFieldText3extends PhabricatorStandardCustomField {45public function getFieldType() {6return 'text';7}89public function buildFieldIndexes() {10$indexes = array();1112$value = $this->getFieldValue();13if (strlen($value)) {14$indexes[] = $this->newStringIndex($value);15}1617return $indexes;18}1920public function readApplicationSearchValueFromRequest(21PhabricatorApplicationSearchEngine $engine,22AphrontRequest $request) {2324return $request->getStr($this->getFieldKey());25}2627public function applyApplicationSearchConstraintToQuery(28PhabricatorApplicationSearchEngine $engine,29PhabricatorCursorPagedPolicyAwareQuery $query,30$value) {3132if (strlen($value)) {33$query->withApplicationSearchContainsConstraint(34$this->newStringIndex(null),35$value);36}37}3839public function appendToApplicationSearchForm(40PhabricatorApplicationSearchEngine $engine,41AphrontFormView $form,42$value) {4344$form->appendChild(45id(new AphrontFormTextControl())46->setLabel($this->getFieldName())47->setName($this->getFieldKey())48->setValue($value));49}5051public function shouldAppearInHerald() {52return true;53}5455public function getHeraldFieldConditions() {56return array(57HeraldAdapter::CONDITION_CONTAINS,58HeraldAdapter::CONDITION_NOT_CONTAINS,59HeraldAdapter::CONDITION_IS,60HeraldAdapter::CONDITION_IS_NOT,61HeraldAdapter::CONDITION_REGEXP,62HeraldAdapter::CONDITION_NOT_REGEXP,63);64}6566public function getHeraldFieldStandardType() {67return HeraldField::STANDARD_TEXT;68}6970protected function getHTTPParameterType() {71return new AphrontStringHTTPParameterType();72}7374public function getConduitEditParameterType() {75return new ConduitStringParameterType();76}7778protected function newExportFieldType() {79return new PhabricatorStringExportField();80}8182}838485