本文整理匯總了PHP中Browser::getChildren方法的典型用法代碼示例。如果您正苦於以下問題:PHP Browser::getChildren方法的具體用法?PHP Browser::getChildren怎麽用?PHP Browser::getChildren使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Browser
的用法示例。
在下文中一共展示了Browser::getChildren方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getChildren
public function getChildren($p)
{
$p['showFoldersContent'] = true;
if (@$p['from'] == 'calendar') {
$p['fl'] = 'id,cid,date,date_end,status,template_id,name,cls';
}
/* set default folder to root on fulltext search, otherwise facets will not be displayed for empty path */
if (!empty($p['query']) && (empty($p['path']) || $p['path'] == '/')) {
$p['path'] = '/' . $this->getRootFolderId();
}
/**/
$rez = parent::getChildren($p);
return $rez;
}
示例2: getChildren
public function getChildren($p)
{
$p['from'] = 'tree';
$rez = parent::getChildren($p);
$sql = 'SELECT count(*) `has_childs`
FROM tree
WHERE pid = $1
AND dstatus = 0' . (empty($p['showFoldersContent']) ? ' AND `template_id` IN (0' . implode(',', Config::get('folder_templates')) . ')' : '');
foreach ($rez['data'] as &$d) {
if (!isset($d['loaded'])) {
if (is_numeric($d['nid'])) {
$res = DB\dbQuery($sql, $d['nid']) or die(DB\dbQueryError());
if ($r = $res->fetch_assoc()) {
$d['has_childs'] = !empty($r['has_childs']);
}
$res->close();
}
$d['loaded'] = empty($d['has_childs']);
}
}
return $rez['data'];
}