3 final class PhabricatorStandardCustomFieldLink
4 extends PhabricatorStandardCustomField
{
6 public function getFieldType() {
10 public function buildFieldIndexes() {
13 $value = $this->getFieldValue();
15 $indexes[] = $this->newStringIndex($value);
21 public function renderPropertyViewValue(array $handles) {
22 $value = $this->getFieldValue();
24 if (!strlen($value)) {
28 if (!PhabricatorEnv
::isValidRemoteURIForLink($value)) {
37 'rel' => 'noreferrer',
42 public function readApplicationSearchValueFromRequest(
43 PhabricatorApplicationSearchEngine
$engine,
44 AphrontRequest
$request) {
46 return $request->getStr($this->getFieldKey());
49 public function applyApplicationSearchConstraintToQuery(
50 PhabricatorApplicationSearchEngine
$engine,
51 PhabricatorCursorPagedPolicyAwareQuery
$query,
54 if (is_string($value) && !strlen($value)) {
58 $value = (array)$value;
60 $query->withApplicationSearchContainsConstraint(
61 $this->newStringIndex(null),
66 public function appendToApplicationSearchForm(
67 PhabricatorApplicationSearchEngine
$engine,
68 AphrontFormView
$form,
72 id(new AphrontFormTextControl())
73 ->setLabel($this->getFieldName())
74 ->setName($this->getFieldKey())
78 public function shouldAppearInHerald() {
82 public function getHeraldFieldConditions() {
84 HeraldAdapter
::CONDITION_CONTAINS
,
85 HeraldAdapter
::CONDITION_NOT_CONTAINS
,
86 HeraldAdapter
::CONDITION_IS
,
87 HeraldAdapter
::CONDITION_IS_NOT
,
88 HeraldAdapter
::CONDITION_REGEXP
,
89 HeraldAdapter
::CONDITION_NOT_REGEXP
,
93 public function getHeraldFieldStandardType() {
94 return HeraldField
::STANDARD_TEXT
;
97 protected function getHTTPParameterType() {
98 return new AphrontStringHTTPParameterType();
101 protected function newConduitSearchParameterType() {
102 return new ConduitStringListParameterType();
105 protected function newConduitEditParameterType() {
106 return new ConduitStringParameterType();