本文整理匯總了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);
}