本文整理汇总了PHP中app\models\Post::toAnchor方法的典型用法代码示例。如果您正苦于以下问题:PHP Post::toAnchor方法的具体用法?PHP Post::toAnchor怎么用?PHP Post::toAnchor使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类app\models\Post
的用法示例。
在下文中一共展示了Post::toAnchor方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _genericPostInfo
private static function _genericPostInfo(Post $Post, array $data, array &$details)
{
$label = CoreUtils::capitalize($data['type']) . " #{$data['id']}";
if (!empty($Post)) {
$label = $Post->toAnchor($label);
}
$details[] = array('Post', $label);
if (empty($Post)) {
$details[] = array('Still exists', false);
}
$EpID = (new Episode($Post))->formatTitle(AS_ARRAY, 'id');
$EpData = Episodes::parseID($EpID);
$Episode = Episodes::getActual($EpData['season'], $EpData['episode'], Episodes::ALLOW_MOVIES);
$details[] = array('Posted under', !empty($Episode) ? "<a href='" . $Episode->formatURL() . "'>{$EpID}</a>" : $EpID . ' (now deleted/moved)');
if (!empty($Post)) {
$details[] = array(($data['type'] === 'request' ? 'Requested' : 'Reserved') . ' by', Users::get($data['type'] === 'request' ? $Post->requested_by : $Post->reserved_by)->getProfileLink());
if ($data['type'] === 'request') {
if (!empty($Post->reserved_by)) {
$details[] = array('Reserved by', Users::get($Post->reserved_by)->getProfileLink());
} else {
$details[] = array('Reserved', false);
}
}
}
}