Page MenuHomePhorge

PhabricatorStandardCustomFieldUsers.php
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

PhabricatorStandardCustomFieldUsers.php

<?php
final class PhabricatorStandardCustomFieldUsers
extends PhabricatorStandardCustomFieldPHIDs {
public function getFieldType() {
return 'users';
}
public function renderEditControl() {
$handles = array();
$value = $this->getFieldValue();
if ($value) {
// TODO: Surface and batch.
$handles = id(new PhabricatorHandleQuery())
->setViewer($this->getViewer())
->withPHIDs($value)
->execute();
}
$control = id(new AphrontFormTokenizerControl())
->setLabel($this->getFieldName())
->setName($this->getFieldKey())
->setDatasource('/typeahead/common/accounts/')
->setCaption($this->getCaption())
->setValue($handles);
$limit = $this->getFieldConfigValue('limit');
if ($limit) {
$control->setLimit($limit);
}
return $control;
}
public function appendToApplicationSearchForm(
PhabricatorApplicationSearchEngine $engine,
AphrontFormView $form,
$value,
array $handles) {
$control = id(new AphrontFormTokenizerControl())
->setLabel($this->getFieldName())
->setName($this->getFieldKey())
->setDatasource('/typeahead/common/accounts/')
->setValue($handles);
$form->appendChild($control);
}
}

File Metadata

Mime Type
text/x-php
Expires
Sun, May 4, 11:08 AM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
64863
Default Alt Text
PhabricatorStandardCustomFieldUsers.php (1 KB)

Event Timeline