Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F97894663
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
Tue, Jan 7, 07:27
Size
1 KB
Mime Type
text/x-php
Expires
Thu, Jan 9, 07:27 (2 d)
Engine
blob
Format
Raw Data
Handle
23433604
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