Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F97593080
PhrictionDocumentEditEngine.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 5, 13:31
Size
1 KB
Mime Type
text/x-php
Expires
Tue, Jan 7, 13:31 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
23358213
Attached To
rPH Phabricator
PhrictionDocumentEditEngine.php
View Options
<?php
final
class
PhrictionDocumentEditEngine
extends
PhabricatorEditEngine
{
const
ENGINECONST
=
'phriction.document'
;
public
function
isEngineConfigurable
()
{
return
false
;
}
public
function
getEngineName
()
{
return
pht
(
'Phriction Document'
);
}
public
function
getSummaryHeader
()
{
return
pht
(
'Edit Phriction Document Configurations'
);
}
public
function
getSummaryText
()
{
return
pht
(
'This engine is used to edit Phriction documents.'
);
}
public
function
getEngineApplicationClass
()
{
return
'PhabricatorPhrictionApplication'
;
}
protected
function
newEditableObject
()
{
$viewer
=
$this
->
getViewer
();
return
PhrictionDocument
::
initializeNewDocument
(
$viewer
,
'/'
);
}
protected
function
newObjectQuery
()
{
return
id
(
new
PhrictionDocumentQuery
())
->
needContent
(
true
);
}
protected
function
getObjectCreateTitleText
(
$object
)
{
return
pht
(
'Create Document'
);
}
protected
function
getObjectCreateButtonText
(
$object
)
{
return
pht
(
'Create Document'
);
}
protected
function
getObjectEditTitleText
(
$object
)
{
return
pht
(
'Edit Document: %s'
,
$object
->
getContent
()->
getTitle
());
}
protected
function
getObjectEditShortText
(
$object
)
{
return
pht
(
'Edit Document'
);
}
protected
function
getObjectCreateShortText
()
{
return
pht
(
'Create Document'
);
}
protected
function
getObjectName
()
{
return
pht
(
'Document'
);
}
protected
function
getEditorURI
()
{
return
'/phriction/document/edit/'
;
}
protected
function
getObjectCreateCancelURI
(
$object
)
{
return
'/phriction/document/'
;
}
protected
function
getObjectViewURI
(
$object
)
{
return
$object
->
getURI
();
}
protected
function
getCreateNewObjectPolicy
()
{
// NOTE: For now, this engine is only to support commenting.
return
PhabricatorPolicies
::
POLICY_NOONE
;
}
protected
function
buildCustomEditFields
(
$object
)
{
return
array
();
}
}
Event Timeline
Log In to Comment