Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F1093937
PhrictionDocumentPublishedHeraldField.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
PhrictionDocumentPublishedHeraldField.php
View Options
<?php
final
class
PhrictionDocumentPublishedHeraldField
extends
PhrictionDocumentHeraldField
{
const
FIELDCONST
=
'phriction.document.published'
;
public
function
getHeraldFieldName
()
{
return
pht
(
'Published document changed'
);
}
public
function
getFieldGroupKey
()
{
return
HeraldTransactionsFieldGroup
::
FIELDGROUPKEY
;
}
public
function
getHeraldFieldValue
(
$object
)
{
// The published document changes if we apply a "publish" transaction
// (which points the published document pointer at new content) or if we
// apply a "content" transaction.
// When a change affects only the draft document, it applies as a "draft"
// transaction.
$type_content
=
PhrictionDocumentContentTransaction
::
TRANSACTIONTYPE
;
$type_publish
=
PhrictionDocumentPublishTransaction
::
TRANSACTIONTYPE
;
if
(
$this
->
hasAppliedTransactionOfType
(
$type_content
))
{
return
true
;
}
if
(
$this
->
hasAppliedTransactionOfType
(
$type_publish
))
{
return
true
;
}
return
false
;
}
protected
function
getHeraldFieldStandardType
()
{
return
self
::
STANDARD_BOOL
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Mon, Jun 30, 8:14 AM (1 d, 19 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
261477
Default Alt Text
PhrictionDocumentPublishedHeraldField.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment