Page MenuHomePhabricator

ProjectCustomField.php

Authored By
bluehawk
Jul 12 2014, 2:57 AM
Size
1 KB
Referenced Files
None
Subscribers
None

ProjectCustomField.php

<?php
final class ProjectCustomField extends PhabricatorProjectCustomField
implements PhabricatorStandardCustomFieldInterface {
public function __construct() {
$proxy = id(new PhabricatorStandardCustomFieldDate())
->setFieldKey($this->getFieldKey())
->setApplicationField($this)
->setFieldConfig(array(
'name' => $this->getFieldName(),
'description' => $this->getFieldDescription(),
));
$this->setProxy($proxy);
}
public function getStandardCustomFieldNamespace() {
return 'project';
}
// == General field identity stuff
public function getFieldKey() {
return 'sprint:startdate';
}
public function getFieldName() {
return 'Sprint Start Date';
}
public function getFieldDescription() {
return 'When a sprint starts';
}
public function renderPropertyViewValue(array $handles) {
if ($this->getProxy()->getFieldValue())
{
return parent::renderPropertyViewValue($handles);
}
return null;
}
// == Search
public function shouldAppearInApplicationSearch()
{
return true;
}
}

File Metadata

Mime Type
text/plain; charset=utf-8
Storage Engine
amazon-s3
Storage Format
Raw Data
Storage Handle
phabricator/7x/fv/eqxbwkggedz6aqnp
Default Alt Text
ProjectCustomField.php (1 KB)

Event Timeline