Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Paste
P1201
ProjectCustomField.php
Active
Public
Actions
Authored by
bluehawk
on Jul 12 2014, 2:57 AM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Award Token
Flag For Later
Tags
None
Referenced Files
F176753: ProjectCustomField.php
Jul 12 2014, 2:57 AM
2014-07-12 02:57:13 (UTC+0)
Subscribers
None
<?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
;
}
}
Event Timeline
bluehawk
edited the content of this paste.
(Show Details)
Jul 12 2014, 2:57 AM
2014-07-12 02:57:13 (UTC+0)
bluehawk
changed the title of this paste from untitled to
ProjectCustomField.php
.
bluehawk
updated the paste's language from
autodetect
to
autodetect
.
Log In to Comment