Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F552527
LegalpadDocumentBody.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
LegalpadDocumentBody.php
View Options
<?php
final
class
LegalpadDocumentBody
extends
LegalpadDAO
implements
PhabricatorMarkupInterface
{
const
MARKUP_FIELD_TEXT
=
'markup:text '
;
protected
$phid
;
protected
$creatorPHID
;
protected
$documentPHID
;
protected
$version
;
protected
$title
;
protected
$text
;
protected
function
getConfiguration
()
{
return
array
(
self
::
CONFIG_AUX_PHID
=>
true
,
self
::
CONFIG_COLUMN_SCHEMA
=>
array
(
'version'
=>
'uint32'
,
'title'
=>
'text255'
,
'text'
=>
'text?'
,
),
self
::
CONFIG_KEY_SCHEMA
=>
array
(
'key_document'
=>
array
(
'columns'
=>
array
(
'documentPHID'
,
'version'
),
'unique'
=>
true
,
),
),
)
+
parent
::
getConfiguration
();
}
public
function
generatePHID
()
{
return
PhabricatorPHID
::
generateNewPHID
(
PhabricatorPHIDConstants
::
PHID_TYPE_LEGB
);
}
/* -( PhabricatorMarkupInterface )----------------------------------------- */
public
function
getMarkupFieldKey
(
$field
)
{
$content
=
$this
->
getMarkupText
(
$field
);
return
PhabricatorMarkupEngine
::
digestRemarkupContent
(
$this
,
$content
);
}
public
function
newMarkupEngine
(
$field
)
{
return
PhabricatorMarkupEngine
::
newMarkupEngine
(
array
());
}
public
function
getMarkupText
(
$field
)
{
switch
(
$field
)
{
case
self
::
MARKUP_FIELD_TEXT
:
$text
=
$this
->
getText
();
break
;
default
:
throw
new
Exception
(
pht
(
'Unknown field: %s'
,
$field
));
}
return
$text
;
}
public
function
didMarkupText
(
$field
,
$output
,
PhutilMarkupEngine
$engine
)
{
require_celerity_resource
(
'phabricator-remarkup-css'
);
return
phutil_tag
(
'div'
,
array
(
'class'
=>
'phabricator-remarkup'
,
),
$output
);
}
public
function
shouldUseMarkupCache
(
$field
)
{
return
(
bool
)
$this
->
getID
();
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Mon, May 12, 4:30 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
123593
Default Alt Text
LegalpadDocumentBody.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment