本文整理汇总了PHP中CFunctions::countBackRefs方法的典型用法代码示例。如果您正苦于以下问题:PHP CFunctions::countBackRefs方法的具体用法?PHP CFunctions::countBackRefs怎么用?PHP CFunctions::countBackRefs使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CFunctions
的用法示例。
在下文中一共展示了CFunctions::countBackRefs方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: intval
* @category Mediusers
* @package Mediboard
* @author SARL OpenXtrem <dev@openxtrem.com>
* @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html
* @version SVN: $Id:\$
* @link http://www.mediboard.org
*/
CCanDo::checkRead();
$function_id = CValue::getOrSession("function_id");
$page_function = intval(CValue::get('page_function', 0));
$step_sec_function = 25;
$primary_users = array();
$total_sec_functions = null;
$function = new CFunctions();
$function->load($function_id);
$total_sec_functions = $function->countBackRefs("users");
/** @var CMediusers[] $primary_users */
$primary_users = $function->loadBackRefs("users", null, "{$page_function}, {$step_sec_function}");
CStoredObject::massLoadFwdRef($primary_users, "_profile_id");
foreach ($primary_users as $_mediuser) {
$_mediuser->loadRefProfile();
}
/** @var CSecondaryFunction[] $secondaries_functions */
$secondaries_functions = $function->loadBackRefs("secondary_functions");
$users = CMbObject::massLoadFwdRef($secondaries_functions, "user_id");
CStoredObject::massLoadFwdRef($users, "_profile_id");
foreach ($secondaries_functions as $_sec_function) {
$_sec_function->loadRefUser();
$_sec_function->_ref_user->loadRefProfile();
}
$smarty = new CSmartyDP();