Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F549055
PhabricatorPolicyEditField.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
PhabricatorPolicyEditField.php
View Options
<?php
final
class
PhabricatorPolicyEditField
extends
PhabricatorEditField
{
private
$policies
;
private
$capability
;
private
$spaceField
;
public
function
setPolicies
(
array
$policies
)
{
$this
->
policies
=
$policies
;
return
$this
;
}
public
function
getPolicies
()
{
if
(
$this
->
policies
===
null
)
{
throw
new
PhutilInvalidStateException
(
'setPolicies'
);
}
return
$this
->
policies
;
}
public
function
setCapability
(
$capability
)
{
$this
->
capability
=
$capability
;
return
$this
;
}
public
function
getCapability
()
{
return
$this
->
capability
;
}
public
function
setSpaceField
(
PhabricatorSpaceEditField
$space_field
)
{
$this
->
spaceField
=
$space_field
;
return
$this
;
}
public
function
getSpaceField
()
{
return
$this
->
spaceField
;
}
protected
function
newControl
()
{
$control
=
id
(
new
AphrontFormPolicyControl
())
->
setCapability
(
$this
->
getCapability
())
->
setPolicyObject
(
$this
->
getObject
())
->
setPolicies
(
$this
->
getPolicies
());
$space_field
=
$this
->
getSpaceField
();
if
(
$space_field
)
{
$control
->
setSpacePHID
(
$space_field
->
getValueForControl
());
}
return
$control
;
}
protected
function
newHTTPParameterType
()
{
return
new
AphrontPHIDHTTPParameterType
();
}
protected
function
newConduitParameterType
()
{
return
new
ConduitStringParameterType
();
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Mon, May 12, 2:00 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
107309
Default Alt Text
PhabricatorPolicyEditField.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment