本文整理汇总了PHP中ViewList::getViews方法的典型用法代码示例。如果您正苦于以下问题:PHP ViewList::getViews方法的具体用法?PHP ViewList::getViews怎么用?PHP ViewList::getViews使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ViewList
的用法示例。
在下文中一共展示了ViewList::getViews方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: foreach
if ($view['parent'] != NULL) {
$parent = $view_tree->getNode($view['parent']);
$parent->addChild($node);
} else {
$view_tree->addChild($node);
}
}
return $view_tree;
}
$existing_views = '';
if ($conf['display_views_using_tree']) {
$initially_open = NULL;
if (!isset($_SESSION['view_tree_built']) && isset($conf['view_tree_nodes_initially_open'])) {
$initially_open = $conf['view_tree_nodes_initially_open'];
}
$view_tree = build_view_tree($viewList->getViews());
$existing_views = '[';
$i = 0;
foreach ($view_tree->getChildren() as $view_node) {
if ($i++ > 0) {
$existing_views .= ',';
}
$existing_views .= $view_node->toJson($initially_open);
$i++;
}
$existing_views .= ']';
$_SESSION['view_tree_built'] = TRUE;
} else {
foreach ($viewList->getViews() as $view) {
if ($view['parent'] == NULL) {
$v = $view['view_name'];