Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F540454
PhabricatorApplyEditField.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
PhabricatorApplyEditField.php
View Options
<?php
final
class
PhabricatorApplyEditField
extends
PhabricatorEditField
{
private
$actionDescription
;
private
$actionConflictKey
;
private
$actionSubmitButtonText
;
private
$options
;
protected
function
newControl
()
{
return
null
;
}
public
function
setActionDescription
(
$action_description
)
{
$this
->
actionDescription
=
$action_description
;
return
$this
;
}
public
function
getActionDescription
()
{
return
$this
->
actionDescription
;
}
public
function
setActionConflictKey
(
$action_conflict_key
)
{
$this
->
actionConflictKey
=
$action_conflict_key
;
return
$this
;
}
public
function
getActionConflictKey
()
{
return
$this
->
actionConflictKey
;
}
public
function
setActionSubmitButtonText
(
$text
)
{
$this
->
actionSubmitButtonText
=
$text
;
return
$this
;
}
public
function
getActionSubmitButtonText
()
{
return
$this
->
actionSubmitButtonText
;
}
public
function
setOptions
(
array
$options
)
{
$this
->
options
=
$options
;
return
$this
;
}
public
function
getOptions
()
{
return
$this
->
options
;
}
protected
function
newHTTPParameterType
()
{
if
(
$this
->
getOptions
())
{
return
new
AphrontPHIDListHTTPParameterType
();
}
else
{
return
new
AphrontBoolHTTPParameterType
();
}
}
protected
function
newConduitParameterType
()
{
return
new
ConduitBoolParameterType
();
}
public
function
shouldGenerateTransactionsFromSubmit
()
{
// This type of edit field just applies a prebuilt action, like "Accept
// Revision", and can not be submitted as part of an "Edit Object" form.
return
false
;
}
protected
function
newCommentAction
()
{
$options
=
$this
->
getOptions
();
if
(
$options
)
{
$action
=
id
(
new
PhabricatorEditEngineCheckboxesCommentAction
())
->
setOptions
(
$options
);
}
else
{
$action
=
id
(
new
PhabricatorEditEngineStaticCommentAction
())
->
setDescription
(
$this
->
getActionDescription
());
}
return
$action
->
setConflictKey
(
$this
->
getActionConflictKey
())
->
setSubmitButtonText
(
$this
->
getActionSubmitButtonText
());
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Mon, May 12, 9:38 AM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
107635
Default Alt Text
PhabricatorApplyEditField.php (2 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment