Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F99680041
HarbormasterBuildPlanEditEngine.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
Sun, Jan 26, 03:25
Size
2 KB
Mime Type
text/x-php
Expires
Tue, Jan 28, 03:25 (2 d)
Engine
blob
Format
Raw Data
Handle
23841390
Attached To
rPH Phabricator
HarbormasterBuildPlanEditEngine.php
View Options
<?php
final
class
HarbormasterBuildPlanEditEngine
extends
PhabricatorEditEngine
{
const
ENGINECONST
=
'harbormaster.buildplan'
;
public
function
isEngineConfigurable
()
{
return
false
;
}
public
function
getEngineName
()
{
return
pht
(
'Harbormaster Build Plans'
);
}
public
function
getSummaryHeader
()
{
return
pht
(
'Edit Harbormaster Build Plan Configurations'
);
}
public
function
getSummaryText
()
{
return
pht
(
'This engine is used to edit Harbormaster build plans.'
);
}
public
function
getEngineApplicationClass
()
{
return
'PhabricatorHarbormasterApplication'
;
}
protected
function
newEditableObject
()
{
$viewer
=
$this
->
getViewer
();
return
HarbormasterBuildPlan
::
initializeNewBuildPlan
(
$viewer
);
}
protected
function
newObjectQuery
()
{
return
new
HarbormasterBuildPlanQuery
();
}
protected
function
getObjectCreateTitleText
(
$object
)
{
return
pht
(
'Create Build Plan'
);
}
protected
function
getObjectCreateButtonText
(
$object
)
{
return
pht
(
'Create Build Plan'
);
}
protected
function
getObjectEditTitleText
(
$object
)
{
return
pht
(
'Edit Build Plan: %s'
,
$object
->
getName
());
}
protected
function
getObjectEditShortText
(
$object
)
{
return
pht
(
'Edit Build Plan'
);
}
protected
function
getObjectCreateShortText
()
{
return
pht
(
'Create Build Plan'
);
}
protected
function
getObjectName
()
{
return
pht
(
'Build Plan'
);
}
protected
function
getEditorURI
()
{
return
'/harbormaster/plan/edit/'
;
}
protected
function
getObjectCreateCancelURI
(
$object
)
{
return
'/harbormaster/plan/'
;
}
protected
function
getObjectViewURI
(
$object
)
{
$id
=
$object
->
getID
();
return
"/harbormaster/plan/{$id}/"
;
}
protected
function
getCreateNewObjectPolicy
()
{
return
$this
->
getApplication
()->
getPolicy
(
HarbormasterCreatePlansCapability
::
CAPABILITY
);
}
protected
function
buildCustomEditFields
(
$object
)
{
return
array
(
id
(
new
PhabricatorTextEditField
())
->
setKey
(
'name'
)
->
setLabel
(
pht
(
'Name'
))
->
setIsRequired
(
true
)
->
setTransactionType
(
HarbormasterBuildPlanTransaction
::
TYPE_NAME
)
->
setDescription
(
pht
(
'The build plan name.'
))
->
setConduitDescription
(
pht
(
'Rename the plan.'
))
->
setConduitTypeDescription
(
pht
(
'New plan name.'
))
->
setValue
(
$object
->
getName
()),
);
}
}
Event Timeline
Log In to Comment