本文整理汇总了PHP中CStoredObject::naturalSort方法的典型用法代码示例。如果您正苦于以下问题:PHP CStoredObject::naturalSort方法的具体用法?PHP CStoredObject::naturalSort怎么用?PHP CStoredObject::naturalSort使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CStoredObject
的用法示例。
在下文中一共展示了CStoredObject::naturalSort方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
$reference = null;
}
CExClassField::$_load_lite = true;
CExObject::$_multiple_load = true;
CExObject::$_load_lite = $detail < 2;
$group_id = $group_id ? $group_id : CGroups::loadCurrent()->_id;
$where = array("group_id = '{$group_id}' OR group_id IS NULL");
if ($ex_class_id) {
$where['ex_class_id'] = "= '{$ex_class_id}'";
}
if (empty(CExClass::$_list_cache)) {
$ex_class = new CExClass();
/** @var CExClass[] $ex_classes */
$ex_classes = $ex_class->loadList($where, "name");
$categories = CStoredObject::massLoadFwdRef($ex_classes, "category_id");
$categories = CStoredObject::naturalSort($categories, array("title"));
$categories = array(new CExClassCategory()) + $categories;
foreach ($ex_classes as $_ex_class) {
$_category_id = $_ex_class->category_id ?: 0;
$categories[$_category_id]->_ref_ex_classes[$_ex_class->_id] = $_ex_class;
}
if (!CExObject::$_locales_cache_enabled && $detail > 1) {
foreach ($ex_classes as $_ex_class) {
foreach ($_ex_class->loadRefsGroups() as $_group) {
$_group->loadRefsFields();
foreach ($_group->_ref_fields as $_field) {
$_field->updateTranslation();
}
}
}
}