Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F102521389
PonderRemarkupRule.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
Fri, Feb 21, 14:46
Size
674 B
Mime Type
text/x-php
Expires
Sun, Feb 23, 14:46 (2 d)
Engine
blob
Format
Raw Data
Handle
24340068
Attached To
rPH Phabricator
PonderRemarkupRule.php
View Options
<?php
final
class
PonderRemarkupRule
extends
PhabricatorRemarkupRuleObject
{
protected
function
getObjectNamePrefix
()
{
return
'Q'
;
}
protected
function
loadObjects
(
array
$ids
)
{
$viewer
=
$this
->
getEngine
()->
getConfig
(
'viewer'
);
return
id
(
new
PonderQuestionQuery
())
->
setViewer
(
$viewer
)
->
withIDs
(
$ids
)
->
execute
();
}
protected
function
shouldMarkupObject
(
array
$params
)
{
// NOTE: Q1, Q2, Q3 and Q4 are often used to refer to quarters of the year;
// mark them up only in the {Q1} format.
if
(
$params
[
'type'
]
==
'ref'
)
{
if
(
$params
[
'id'
]
<=
4
)
{
return
false
;
}
}
return
true
;
}
}
Event Timeline
Log In to Comment