本文整理汇总了PHP中Argument::parent方法的典型用法代码示例。如果您正苦于以下问题:PHP Argument::parent方法的具体用法?PHP Argument::parent怎么用?PHP Argument::parent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Argument
的用法示例。
在下文中一共展示了Argument::parent方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: drawArgumentBoxExtended
function drawArgumentBoxExtended(Question $q, $view, $basePath, Argument $a, $tabUseParent = false, $abstract = true, $drawTabs = true, $customTabRoot = false)
{
global $sTemplate;
$tabArg = $a;
$tabArg2 = $tabArg;
if ($tabUseParent) {
$tabArg = $a->parent();
}
if ($customTabRoot) {
$tabArg = $customTabRoot;
$tabArg2 = $customTabRoot;
if ($tabUseParent) {
$tabArg = $tabArg->parent();
}
}
$tabs = "\n<div class = 'tab" . ($view == VIEW_DISCUSSION ? " tab_active" : "") . "'>\n <a href = '" . $basePath . "'>" . $sTemplate->getString("QUESTION_TAB_DISCUSSION") . "</a>\n</div>\n<div class = 'tab" . ($view == VIEW_DETAILS ? " tab_active" : "") . "'>\n <a href = '" . $basePath . "details/'>" . $sTemplate->getString("QUESTION_TAB_DETAILS") . "</a>\n</div>\n<div class = 'tab " . ($tabArg->type() == ARGUMENT_PRO ? "tab_arg_pro" : "tab_arg_con") . "'>\n <a href = '" . $tabArg->url($basePath) . "'>" . $sTemplate->getString("QUESTION_TAB_ARGUMENT", array("[TITLE]"), array($tabArg->headline())) . "</a>\n</div>\n<div class = 'tab " . (!$tabUseParent && $view != VIEW_NEW_COUNTER_ARGUMENT ? " tab_active" : "") . " " . ($tabArg->type() != ARGUMENT_PRO ? "tab_arg_pro" : "tab_arg_con") . "'>\n <a href = '" . $tabArg->url($basePath) . "ca/'>" . $sTemplate->getString("QUESTION_TAB_COUNTER_ARGUMENT", array("[TITLE]"), array($tabArg->headline())) . "</a>\n</div>";
if ($tabUseParent) {
$tabs .= "\n<div class = 'tab tab_active " . ($tabArg2->type() != ARGUMENT_PRO ? "tab_arg_pro" : "tab_arg_con") . "'>\n <a href = '" . $tabArg2->url($basePath) . "'>" . $sTemplate->getString("QUESTION_TAB_COUNTER_ARGUMENT", array("[TITLE]"), array($tabArg2->headline())) . "</a>\n</div>";
}
if ($view == VIEW_NEW_COUNTER_ARGUMENT) {
$tabs .= "\n<div class = 'tab tab_active'>\n " . $sTemplate->getString("QUESTION_TAB_NEW_COUNTER_ARGUMENT") . "\n</div>";
}
if (!$drawTabs) {
$tabs = "";
}
echo drawArgumentBoxRaw($q, $tabs, $a, $basePath, $abstract);
}