本文整理汇总了PHP中site_object_controller::create方法的典型用法代码示例。如果您正苦于以下问题:PHP site_object_controller::create方法的具体用法?PHP site_object_controller::create怎么用?PHP site_object_controller::create使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类site_object_controller
的用法示例。
在下文中一共展示了site_object_controller::create方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
function &get_dataset($params = array())
{
$request = request::instance();
if (!($controller_id = $request->get_attribute('controller_id'))) {
return new array_dataset();
}
$db_table =& db_table_factory::instance('sys_controller');
$controller_data = $db_table->get_row_by_id($controller_id);
if (!$controller_data) {
return new array_dataset();
}
$site_object_controller =& site_object_controller::create($controller_data['name']);
$actions = $site_object_controller->get_actions_definitions();
$user_groups =& fetch_sub_branch('/root/user_groups', 'user_group', $counter);
$result = array();
foreach ($actions as $action => $action_params) {
if (isset($action_params['action_name'])) {
$result[$action]['action_name'] = $action_params['action_name'];
} else {
$result[$action]['action_name'] = str_replace('_', ' ', strtoupper($action[0]) . substr($action, 1));
}
$result[$action]['permissions_required'] = $action_params['permissions_required'];
foreach ($user_groups as $group_id => $group_data) {
$result[$action]['groups'][$group_id]['selector_name'] = 'policy[' . $group_id . '][' . $action . ']';
}
}
return new array_dataset($result);
}
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:28,代码来源:controller_group_action_access_datasource.class.php
示例2: array
function & get_dataset($params = array())
{
$request = request :: instance();
if(!$controller_id = $this->_get_controller_id())
return new array_dataset();
$db_table =& db_table_factory :: instance('sys_controller');
$controller_data = $db_table->get_row_by_id($controller_id);
if (!$controller_data)
return new array_dataset();
$site_object_controller =& site_object_controller :: create($controller_data['name']);
$actions = $site_object_controller->get_actions_definitions();
$result = array();
foreach($actions as $action => $action_params)
{
if (!isset($action_params['can_have_access_template']) || !$action_params['can_have_access_template'])
continue;
if(isset($action_params['action_name']))
$result[$action]['action_name'] = $action_params['action_name'];
else
$result[$action]['action_name'] = str_replace('_', ' ', strtoupper($action{0}) . substr($action, 1));
}
return new array_dataset($result);
}
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:31,代码来源:controller_template_actions_list_datasource.class.php
示例3: array
function & get_dataset($params = array())
{
$request = request :: instance();
if(!$controller_id = $request->get_attribute('controller_id'))
return new array_dataset();
$db_table =& db_table_factory :: instance('sys_controller');
$controller_data = $db_table->get_row_by_id($controller_id);
if (!$controller_data)
return new array_dataset();
$site_object_controller =& site_object_controller :: create($controller_data['name']);
$actions = $site_object_controller->get_actions_definitions();
$user_groups =& fetch_sub_branch('/root/admin/user_groups', 'user_group', $counter);
$result = array();
foreach($user_groups as $group_id => $group_data)
{
foreach($actions as $action => $action_params)
{
if (!isset($action_params['can_have_access_template']) || !$action_params['can_have_access_template'])
continue;
if(isset($action_params['action_name']))
$result[$group_id]['actions'][$action]['action_name'] = $action_params['action_name'];
else
$result[$group_id]['actions'][$action]['action_name'] = str_replace('_', ' ', strtoupper($action{0}) . substr($action, 1));
$result[$group_id]['group_name'] = $group_data['identifier'];
$result[$group_id]['actions'][$action]['selector_name'] = 'template[' . $action . '][' . $group_id . ']';
}
}
return new array_dataset($result);
}
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:40,代码来源:controller_group_access_template_datasource.class.php
示例4:
function &get_controller()
{
$c =& site_object_controller::create($this->_class_properties['controller_class_name']);
return $c;
}
示例5: create
function & get_controller()
{
if ($this->_controller)
return $this->_controller;
$controller_name = $this->get_controller_name();
$this->_controller =& site_object_controller :: create($controller_name);
return $this->_controller;
}
示例6: create
function &_get_controller($controller_name)
{
$controller =& site_object_controller :: create($controller_name);
return $controller;
}