Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F101050884
AlmanacPropertyEditEngine.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
Wed, Feb 5, 05:38
Size
1 KB
Mime Type
text/x-php
Expires
Fri, Feb 7, 05:38 (2 d)
Engine
blob
Format
Raw Data
Handle
24069321
Attached To
rPH Phabricator
AlmanacPropertyEditEngine.php
View Options
<?php
abstract
class
AlmanacPropertyEditEngine
extends
PhabricatorEditEngine
{
private
$propertyKey
;
public
function
setPropertyKey
(
$property_key
)
{
$this
->
propertyKey
=
$property_key
;
return
$this
;
}
public
function
getPropertyKey
()
{
return
$this
->
propertyKey
;
}
public
function
isEngineConfigurable
()
{
return
false
;
}
public
function
isEngineExtensible
()
{
return
false
;
}
public
function
getEngineName
()
{
return
pht
(
'Almanac Properties'
);
}
public
function
getSummaryHeader
()
{
return
pht
(
'Edit Almanac Property Configurations'
);
}
public
function
getSummaryText
()
{
return
pht
(
'This engine is used to edit Almanac properties.'
);
}
public
function
getEngineApplicationClass
()
{
return
'PhabricatorAlmanacApplication'
;
}
protected
function
newEditableObject
()
{
throw
new
PhutilMethodNotImplementedException
();
}
protected
function
getObjectCreateTitleText
(
$object
)
{
return
pht
(
'Create Property'
);
}
protected
function
getObjectCreateButtonText
(
$object
)
{
return
pht
(
'Create Property'
);
}
protected
function
getObjectEditTitleText
(
$object
)
{
return
pht
(
'Edit Property: %s'
,
$object
->
getName
());
}
protected
function
getObjectEditShortText
(
$object
)
{
return
pht
(
'Edit Property'
);
}
protected
function
getObjectCreateShortText
()
{
return
pht
(
'Create Property'
);
}
protected
function
buildCustomEditFields
(
$object
)
{
$property_key
=
$this
->
getPropertyKey
();
$xaction_type
=
AlmanacTransaction
::
TYPE_PROPERTY_UPDATE
;
return
array
(
id
(
new
PhabricatorTextEditField
())
->
setKey
(
'value'
)
->
setMetadataValue
(
'almanac.property'
,
$property_key
)
->
setLabel
(
$property_key
)
->
setTransactionType
(
$xaction_type
)
->
setValue
(
$object
->
getAlmanacPropertyValue
(
$property_key
)),
);
}
}
Event Timeline
Log In to Comment