Page MenuHomePhorge

PhabricatorStandardCustomFieldText.php
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

PhabricatorStandardCustomFieldText.php

<?php
final class PhabricatorStandardCustomFieldText
extends PhabricatorStandardCustomField {
public function getFieldType() {
return 'text';
}
public function buildFieldIndexes() {
$indexes = array();
$value = $this->getFieldValue();
if (phutil_nonempty_string($value)) {
$indexes[] = $this->newStringIndex($value);
}
return $indexes;
}
public function readApplicationSearchValueFromRequest(
PhabricatorApplicationSearchEngine $engine,
AphrontRequest $request) {
return $request->getStr($this->getFieldKey());
}
public function applyApplicationSearchConstraintToQuery(
PhabricatorApplicationSearchEngine $engine,
PhabricatorCursorPagedPolicyAwareQuery $query,
$value) {
if (phutil_nonempty_string($value)) {
$query->withApplicationSearchContainsConstraint(
$this->newStringIndex(null),
$value);
}
}
public function appendToApplicationSearchForm(
PhabricatorApplicationSearchEngine $engine,
AphrontFormView $form,
$value) {
$form->appendChild(
id(new AphrontFormTextControl())
->setLabel($this->getFieldName())
->setName($this->getFieldKey())
->setValue($value));
}
public function shouldAppearInHerald() {
return true;
}
public function getHeraldFieldConditions() {
return array(
HeraldAdapter::CONDITION_CONTAINS,
HeraldAdapter::CONDITION_NOT_CONTAINS,
HeraldAdapter::CONDITION_IS,
HeraldAdapter::CONDITION_IS_NOT,
HeraldAdapter::CONDITION_REGEXP,
HeraldAdapter::CONDITION_NOT_REGEXP,
);
}
public function getHeraldFieldStandardType() {
return HeraldField::STANDARD_TEXT;
}
protected function getHTTPParameterType() {
return new AphrontStringHTTPParameterType();
}
public function getConduitEditParameterType() {
return new ConduitStringParameterType();
}
protected function newExportFieldType() {
return new PhabricatorStringExportField();
}
}

File Metadata

Mime Type
text/x-php
Expires
Mon, May 12, 1:38 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
96539
Default Alt Text
PhabricatorStandardCustomFieldText.php (1 KB)

Event Timeline