本文整理匯總了PHP中CTag::countChildren方法的典型用法代碼示例。如果您正苦於以下問題:PHP CTag::countChildren方法的具體用法?PHP CTag::countChildren怎麽用?PHP CTag::countChildren使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類CTag
的用法示例。
在下文中一共展示了CTag::countChildren方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: elseif
$count_children = $object->_totalSeek;
} elseif (strpos($tag_id, "none") === 0) {
$parts = explode("-", $tag_id);
$object_class = $parts[1];
$tag->object_class = $object_class;
$object = new $object_class();
$where["tag_item_id"] = "IS NULL";
$ljoin = array("tag_item" => "tag_item.object_id = {$object->_spec->table}.{$object->_spec->key} AND tag_item.object_class = '{$object_class}'");
if (!$keywords) {
$keywords = "%";
}
$objects = $object->seek($keywords, $where, 10000, true, $ljoin);
$count_children = $object->_totalSeek;
} else {
$tag->load($tag_id);
$count_children = $tag->countChildren();
$objects = $tag->getObjects($keywords);
// filter by group_id
if ($group_id) {
foreach ($objects as $_id => $_object) {
if ($_object->group_id && $_object->group_id != $group_id) {
unset($objects[$_id]);
}
}
}
}
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("objects", $objects);
$smarty->assign("columns", $columns);
$smarty->assign("insertion", $insertion);