本文整理汇总了PHP中KunenaDate::toSpan方法的典型用法代码示例。如果您正苦于以下问题:PHP KunenaDate::toSpan方法的具体用法?PHP KunenaDate::toSpan怎么用?PHP KunenaDate::toSpan使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KunenaDate
的用法示例。
在下文中一共展示了KunenaDate::toSpan方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: fillTopicInfo
function fillTopicInfo($matches)
{
switch ($matches[1]) {
case 'ROW':
return $matches[2] . $this->row() . ($this->topic->ordering ? " {$matches[2]}sticky" : '');
case 'TOPIC_ICON':
return $this->topic->getIcon();
case 'DATE':
$date = new KunenaDate($matches[2]);
return $date->toSpan('config_post_dateformat', 'config_post_dateformat_hover');
}
}
示例2: fillMessageInfo
function fillMessageInfo($matches)
{
switch ($matches[1]) {
case 'ROW':
return $this->mmm & 1 ? 'odd' : 'even';
case 'DATE':
$date = new KunenaDate($matches[2]);
return $date->toSpan('config_post_dateformat', 'config_post_dateformat_hover');
case 'NEW':
return $this->message->isNew() ? 'new' : 'old';
case 'REPLYNO':
return $this->replynum;
case 'MESSAGE_PROFILE':
return $this->getMessageProfileBox();
case 'MESSAGE_ACTIONS':
return $this->getMessageActions();
}
}
示例3: fillTopicInfo
function fillTopicInfo($matches)
{
switch ($matches[1]) {
case 'ROW':
return $matches[2] . ($this->position & 1 ? 'odd' : 'even') . ($this->topic->ordering ? " {$matches[2]}sticky" : '');
case 'TOPIC_ICON':
return $this->topic->getIcon();
case 'TOPIC_NEW_COUNT':
return $this->topic->unread ? $this->getTopicLink($this->topic, 'unread', '<sup class="kindicator-new">(' . $this->topic->unread . ' ' . JText::_('COM_KUNENA_A_GEN_NEWCHAR') . ')</sup>') : '';
case 'DATE':
$date = new KunenaDate($matches[2]);
return $date->toSpan('config_post_dateformat', 'config_post_dateformat_hover');
}
}