本文整理匯總了PHP中common_node::getAuthorStats方法的典型用法代碼示例。如果您正苦於以下問題:PHP common_node::getAuthorStats方法的具體用法?PHP common_node::getAuthorStats怎麽用?PHP common_node::getAuthorStats使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類common_node
的用法示例。
在下文中一共展示了common_node::getAuthorStats方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: mainAction
/**
* main action
*/
public function mainAction()
{
/**
* input
*/
if (is_numeric($_POST['customer_id'])) {
$customer_id = $_POST['customer_id'];
} else {
$customer_id = 0;
}
/**
* bo users list
*/
require_once 'models/client/client_customer.php';
$Customer = new client_customer();
$bo_users_list = $Customer->getCustomersWithRole();
foreach ($bo_users_list as $customer) {
$this->tpl->assign('CUSTOMER', $customer);
if ($customer['id'] == $customer_id) {
$this->tpl->assign('SELECTED', 'selected="selected"');
} else {
$this->tpl->assign('SELECTED', '');
}
$this->tpl->parse('content.item');
}
/**
* stats
*/
$author_stats = array();
/**
* common_node
*/
require_once 'models/common/common_node.php';
$Node = new common_node();
$author_stats['common_node'] = $Node->getAuthorStats($customer_id);
/**
* common_image
*/
require_once 'models/common/common_image.php';
$Image = new common_image();
$author_stats['common_image'] = $Image->getAuthorStats($customer_id);
/**
* common_revision
*/
require_once 'models/common/common_revision.php';
$Revision = new common_revision();
$author_stats['common_revision'] = $Revision->getAuthorStats($customer_id);
/**
* assign
*/
$this->tpl->assign('AUTHOR_STATS', $author_stats);
return true;
}