Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F77547730
AlmanacProperty.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Thu, Aug 15, 02:56
Size
1 KB
Mime Type
text/x-php
Expires
Sat, Aug 17, 02:56 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
19886154
Attached To
rPH Phabricator
AlmanacProperty.php
View Options
<?php
final
class
AlmanacProperty
extends
PhabricatorCustomFieldStorage
implements
PhabricatorPolicyInterface
{
protected
$fieldName
;
private
$object
=
self
::
ATTACHABLE
;
public
function
getApplicationName
()
{
return
'almanac'
;
}
protected
function
getConfiguration
()
{
$config
=
parent
::
getConfiguration
();
$config
[
self
::
CONFIG_COLUMN_SCHEMA
]
+=
array
(
'fieldName'
=>
'text128'
,
);
return
$config
;
}
public
function
getObject
()
{
return
$this
->
assertAttached
(
$this
->
object
);
}
public
function
attachObject
(
PhabricatorLiskDAO
$object
)
{
$this
->
object
=
$object
;
return
$this
;
}
/* -( PhabricatorPolicyInterface )----------------------------------------- */
public
function
getCapabilities
()
{
return
array
(
PhabricatorPolicyCapability
::
CAN_VIEW
,
PhabricatorPolicyCapability
::
CAN_EDIT
,
);
}
public
function
getPolicy
(
$capability
)
{
return
$this
->
getObject
()->
getPolicy
(
$capability
);
}
public
function
hasAutomaticCapability
(
$capability
,
PhabricatorUser
$viewer
)
{
return
$this
->
getObject
()->
hasAutomaticCapability
(
$capability
,
$viewer
);
}
public
function
describeAutomaticCapability
(
$capability
)
{
return
pht
(
'Properties inherit the policies of their object.'
);
}
}
Event Timeline
Log In to Comment