Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F935082
PhrictionDocumentEditEngine.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
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
::
class
;
}
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
();
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Mon, Jun 16, 11:56 PM (1 d, 14 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
220857
Default Alt Text
PhrictionDocumentEditEngine.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment