本文整理汇总了PHP中CTag::getObjects方法的典型用法代码示例。如果您正苦于以下问题:PHP CTag::getObjects方法的具体用法?PHP CTag::getObjects怎么用?PHP CTag::getObjects使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CTag
的用法示例。
在下文中一共展示了CTag::getObjects方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: elseif
} 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);
$smarty->assign("count_children", $count_children);