本文整理汇总了PHP中site_object_controller类的典型用法代码示例。如果您正苦于以下问题:PHP site_object_controller类的具体用法?PHP site_object_controller怎么用?PHP site_object_controller使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了site_object_controller类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: admin_page_controller
function admin_page_controller()
{
$this->_actions = array(
'display' => array(
'permissions_required' => 'r',
'template_path' => '/admin/admin_page.html',
'transaction' => false,
),
'admin_display' => array(
'permissions_required' => 'r',
'template_path' => '/admin/admin_page.html',
'transaction' => false,
),
'edit' => array(
'permissions_required' => 'w',
'popup' => true,
'JIP' => true,
'action_name' => strings :: get('edit'),
'action_path' => '/site_object/edit_action',
'template_path' => '/site_object/edit.html',
'img_src' => '/shared/images/edit.gif'
),
'register_new_object' => array(
'permissions_required' => 'w',
'popup' => true,
'JIP' => true,
'action_name' => strings :: get('register_new_object'),
'action_path' => '/site_object/register_new_object_action',
'template_path' => '/site_object/register_new_object.html',
'img_src' => '/shared/images/activate.gif'
)
);
parent :: site_object_controller();
}
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:35,代码来源:admin_page_controller.class.php
示例2: users_folder_controller
function users_folder_controller()
{
$this->_actions = array(
'display' => array(
'permissions_required' => 'r',
'template_path' => '/users_folder/display.html'
),
'create_user' => array(
'permissions_required' => 'w',
'template_path' => '/user/create.html',
'action_path' => '/user/create_user_action',
'JIP' => true,
'popup' => true,
'img_src' => '/shared/images/new.generic.gif',
'action_name' => strings :: get('create_user', 'user'),
'can_have_access_template' => true,
),
'edit' => array(
'permissions_required' => 'w',
'popup' => true,
'JIP' => true,
'action_name' => strings :: get('edit'),
'action_path' => '/site_object/edit_action',
'template_path' => '/site_object/edit.html',
'img_src' => '/shared/images/edit.gif'
),
);
parent :: site_object_controller();
}
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:31,代码来源:users_folder_controller.class.php
示例3: stats_event_controller
function stats_event_controller()
{
$this->_actions = array(
'events_list' => array(
'permissions_required' => 'r',
'template_path' => '/stats_event/events_list.html',
'action_name' => strings :: get('show_events_list', 'stats'),
'action_path' => '/stats_event/stats_event_filter_action',
),
'edit' => array(
'permissions_required' => 'w',
'popup' => true,
'JIP' => true,
'action_name' => strings :: get('edit'),
'action_path' => '/site_object/edit_action',
'template_path' => '/site_object/edit.html',
'img_src' => '/shared/images/edit.gif'
),
'delete' => array(
'permissions_required' => 'w',
'JIP' => true,
'popup' => true,
'action_name' => strings :: get('delete'),
'action_path' => '/site_object/delete_action',
'template_path' => '/site_object/delete.html',
'img_src' => '/shared/images/rem.gif'
),
);
parent :: site_object_controller();
}
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:31,代码来源:stats_event_controller.class.php
示例4: simple_order_object_controller
function simple_order_object_controller()
{
$this->_actions = array(
'display' => array(
'permissions_required' => 'r',
'template_path' => '/simple_order_object/display.html',
),
'view' => array(
'permissions_required' => 'r',
'popup' => true,
'JIP' => true,
'action_name' => strings :: get('detail_info'),
'template_path' => '/simple_order_object/view.html',
'img_src' => '/shared/images/admin_detail.gif'
),
'delete' => array(
'permissions_required' => 'w',
'JIP' => true,
'popup' => true,
'action_name' => strings :: get('delete'),
'action_path' => '/simple_order_object/delete_simple_order_object_action',
'template_path' => '/site_object/delete.html',
'img_src' => '/shared/images/rem.gif'
),
);
parent :: site_object_controller();
}
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:29,代码来源:simple_order_object_controller.class.php
示例5: objects_access_controller
function objects_access_controller()
{
$this->_actions = array(
'display' => array(
'permissions_required' => 'r',
'template_path' => '/objects_access/set_group_access.html',
'action_path' => '/objects_access/set_group_objects_access',
),
'set_group_access' => array(
'permissions_required' => 'w',
'template_path' => '/objects_access/set_group_access.html',
'action_path' => '/objects_access/set_group_objects_access',
'JIP' => true,
'img_src' => '/shared/images/access_manage.gif',
'action_name' => strings :: get('set_group_access'),
),
'toggle' => array(
'permissions_required' => 'r',
'template_path' => '/objects_access/set_group_access.html',
'action_path' => '/objects_access/group_objects_access_tree_toggle_action',
),
'edit' => array(
'permissions_required' => 'w',
'popup' => true,
'JIP' => true,
'action_name' => strings :: get('edit'),
'action_path' => '/site_object/edit_action',
'template_path' => '/site_object/edit.html',
'img_src' => '/shared/images/edit.gif'
),
);
parent :: site_object_controller();
}
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:35,代码来源:objects_access_controller.class.php
示例6: get_dataset
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
示例7: login_object_controller
function login_object_controller()
{
$this->_actions = array(
'login' => array(
'permissions_required' => 'r',
'action_path' => 'login_action',
'template_path' => 'login.html'
),
'logout' => array(
'permissions_required' => 'r',
'action_path' => 'logout_action',
),
'edit' => array(
'permissions_required' => 'w',
'popup' => true,
'JIP' => true,
'action_name' => strings :: get('edit'),
'action_path' => '/site_object/edit_action',
'template_path' => '/site_object/edit.html',
'img_src' => '/shared/images/edit.gif'
),
'change_user_locale' => array(
'permissions_required' => 'w',
'popup' => true,
'action_name' => strings :: get('change_locale', 'user'),
'action_path' => '/user/change_user_locale_action',
),
);
parent :: site_object_controller();
}
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:31,代码来源:login_object_controller.class.php
示例8: setUp
function setUp()
{
$this->db =& db_factory::instance();
$this->_clean_up();
$this->_init_site_object();
$this->object->set_attribute('controller_name', 'site_object_controller');
$controller_id = site_object_controller::get_id('site_object_controller');
$this->object->set_attribute('controller_id', $controller_id);
debug_mock::init($this);
$user =& user::instance();
$user->_set_id(10);
$tree =& tree::instance();
$values['identifier'] = 'root';
$values['object_id'] = 100;
$this->root_node_id = $tree->create_root_node($values, false, true);
$class_id = $this->object->get_class_id();
$this->db->sql_insert('sys_site_object', array('id' => 100, 'class_id' => $class_id, 'current_version' => 1));
$values['identifier'] = 'ru';
$values['object_id'] = 1;
$this->parent_node_id = $tree->create_sub_node($this->root_node_id, $values);
$this->db->sql_insert('sys_site_object', array('id' => 1, 'class_id' => $class_id, 'current_version' => 1));
$values['identifier'] = 'document';
$values['object_id'] = 10;
$this->sub_node_id = $tree->create_sub_node($this->parent_node_id, $values);
$this->db->sql_insert('sys_site_object', array('id' => 10, 'class_id' => $class_id, 'current_version' => 1));
}
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:26,代码来源:site_object_manipulation_test.class.php
示例9: init
function init(&$object)
{
$this->class_id = $object->get_class_id();
$this->controller_id = site_object_controller::get_id(get_class($object) . '_controller');
$this->_insert_sys_site_object_records();
$this->_insert_fake_sys_site_object_records();
}
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:7,代码来源:site_object_fetch_test_init.php
示例10: 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
示例11: _valid_perform
function _valid_perform(&$request, &$response)
{
$tree =& tree::instance();
$params = array();
$params['identifier'] = $this->dataspace->get('identifier');
$params['class'] = $this->dataspace->get('class_name');
$params['title'] = $this->dataspace->get('title');
$params['parent_node_id'] = $this->dataspace->get('parent_node_id');
$params['controller_id'] = site_object_controller::get_id($this->dataspace->get('controller_name'));
$object =& site_object_factory::create($params['class']);
if (!($parent_data = fetch_one_by_node_id($params['parent_node_id']))) {
error("parent wasn't retrieved", __FILE__ . ' : ' . __LINE__ . ' : ' . __FUNCTION__);
}
$object->merge_attributes($params);
if (!$object->create()) {
error("object wasn't registered", __FILE__ . ' : ' . __LINE__ . ' : ' . __FUNCTION__);
}
$parent_object =& site_object_factory::create($parent_data['class_name']);
$parent_object->merge_attributes($parent_data);
$access_policy =& access_policy::instance();
$access_policy->save_initial_object_access($object, $parent_object);
$request->set_status(REQUEST_STATUS_FORM_SUBMITTED);
if ($request->has_attribute('popup')) {
$response->write(close_popup_response($request));
}
}
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:26,代码来源:register_new_object_action.class.php
示例12: faq_object_controller
function faq_object_controller()
{
$this->_actions = array(
'display' => array(
'permissions_required' => 'r',
'template_path' => '/faq_object/display.html',
),
'admin_detail' => array(
'permissions_required' => 'r',
'template_path' => '/admin/object_detail_info.html',
'popup' => true,
'JIP' => true,
'img_src' => '/shared/images/details.gif',
'action_name' => strings :: get('detail_info'),
),
'edit' => array(
'permissions_required' => 'w',
'popup' => true,
'JIP' => true,
'action_name' => strings :: get('edit_faq_question', 'faq'),
'action_path' => '/faq_object/edit_faq_object_action',
'template_path' => '/faq_object/edit.html',
'img_src' => '/shared/images/edit.gif'
),
'publish' => array(
'permissions_required' => 'w',
'popup' => true,
'JIP' => true,
'action_name' => strings :: get('publish'),
'action_path' => '/doc_flow_object/set_publish_status_action',
'img_src' => '/shared/images/publish.gif',
'template_path' => '/news_object/display.html',
'can_have_access_template' => true,
),
'unpublish' => array(
'permissions_required' => 'w',
'popup' => true,
'JIP' => true,
'action_name' => strings :: get('unpublish'),
'action_path' => '/doc_flow_object/set_publish_status_action',
'img_src' => '/shared/images/unpublish.gif',
'template_path' => '/news_object/display.html',
'can_have_access_template' => true,
),
'delete' => array(
'permissions_required' => 'w',
'JIP' => true,
'popup' => true,
'action_name' => strings :: get('delete_faq_question','faq'),
'action_path' => '/faq_object/delete_faq_object_action',
'template_path' => '/site_object/delete.html',
'img_src' => '/shared/images/rem.gif'
),
);
parent :: site_object_controller();
}
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:58,代码来源:faq_object_controller.class.php
示例13: pricelist_object_controller
function pricelist_object_controller()
{
$this->_actions = array(
'display' => array(
'permissions_required' => 'r',
'template_path' => '/pricelist_object/display.html',
),
'admin_display' => array(
'permissions_required' => 'rw',
'template_path' => '/pricelist_object/admin_display.html'
),
'edit' => array(
'permissions_required' => 'w',
'popup' => true,
'JIP' => true,
'action_name' => strings :: get('edit_pricelist_object', 'pricelist'),
'action_path' => '/pricelist_object/edit_pricelist_object_action',
'template_path' => '/pricelist_object/edit.html',
'img_src' => '/shared/images/edit.gif'
),
'publish' => array(
'permissions_required' => 'w',
'popup' => true,
'JIP' => true,
'action_name' => strings :: get('publish'),
'action_path' => '/doc_flow_object/publish_action',
'img_src' => '/shared/images/publish.gif',
'can_have_access_template' => true,
),
'unpublish' => array(
'permissions_required' => 'w',
'popup' => true,
'JIP' => true,
'action_name' => strings :: get('unpublish'),
'action_path' => '/doc_flow_object/unpublish_action',
'img_src' => '/shared/images/unpublish.gif',
'can_have_access_template' => true,
),
'delete' => array(
'permissions_required' => 'w',
'JIP' => true,
'popup' => true,
'action_name' => strings :: get('delete_pricelist_object', 'pricelist'),
'action_path' => '/pricelist_object/delete_pricelist_object_action',
'template_path' => '/site_object/delete.html',
'img_src' => '/shared/images/rem.gif'
),
'order' => array(
'permissions_required' => 'r',
'action_path' => 'tree_change_order_action',
'display_in_breadcrumbs' => false,
'popup' => true,
),
);
parent :: site_object_controller();
}
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:57,代码来源:pricelist_object_controller.class.php
示例14: _define_actions
function _define_actions()
{
return array(
'display' => array(
'permissions_required' => 'r',
'template_path' => '/announce_object/display.html',
),
'admin_detail' => array(
'permissions_required' => 'r',
'template_path' => '/admin/object_detail_info.html',
'popup' => true,
'JIP' => true,
'img_src' => '/shared/images/admin_detail.gif',
'action_name' => strings :: get('detail_info'),
),
'edit' => array(
'permissions_required' => 'w',
'popup' => true,
'JIP' => true,
'action_name' => strings :: get('edit_announce', 'announce'),
'action_path' => '/announce_object/edit_announce_action',
'template_path' => '/announce_object/edit.html',
'img_src' => '/shared/images/edit.gif'
),
'publish' => array(
'permissions_required' => 'w',
'popup' => true,
'JIP' => true,
'action_name' => strings :: get('publish'),
'action_path' => '/doc_flow_object/set_publish_status_action',
'img_src' => '/shared/images/publish.gif',
'can_have_access_template' => true,
),
'unpublish' => array(
'permissions_required' => 'w',
'popup' => true,
'JIP' => true,
'action_name' => strings :: get('unpublish'),
'action_path' => '/doc_flow_object/set_publish_status_action',
'img_src' => '/shared/images/unpublish.gif',
'can_have_access_template' => true,
),
'delete' => array(
'permissions_required' => 'w',
'JIP' => true,
'popup' => true,
'action_name' => strings :: get('delete_announce', 'announce'),
'action_path' => 'form_delete_site_object_action',
'template_path' => '/site_object/delete.html',
'img_src' => '/shared/images/rem.gif'
),
);
parent :: site_object_controller();
}
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:56,代码来源:announce_object_controller.class.php
示例15: fetch_object_controller_test
function fetch_object_controller_test()
{
$this->_actions = array(
'display' => array(
'permissions_required' => 'r',
),
);
parent :: site_object_controller();
}
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:10,代码来源:fetching_test.class.php
示例16: site_map_controller
function site_map_controller()
{
$this->_actions = array(
'display' => array(
'permissions_required' => 'r',
'template_path' => '/site_map/site_map.html',
),
);
parent :: site_object_controller();
}
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:11,代码来源:site_map_controller.class.php
示例17: template_source_controller
function template_source_controller()
{
$this->_actions = array(
'display' => array(
'permissions_required' => 'r',
'action_path' => '/template_source/display_template_source_action',
'template_path' => '/template_source/display.html',
),
);
parent :: site_object_controller();
}
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:12,代码来源:template_source_controller.class.php
示例18: faq_folder_container_controller
function faq_folder_container_controller()
{
$this->_actions = array(
'display' => array(
'permissions_required' => 'r',
'template_path' => '/faq_folder_container/display.html'
),
'admin_display' => array(
'permissions_required' => 'r',
'template_path' => '/faq_folder_container/admin_display.html'
),
'create_faq_folder' => array(
'permissions_required' => 'w',
'template_path' => '/faq_folder/create.html',
'action_path' => '/faq_folder/create_faq_folder_action',
'JIP' => true,
'popup' => true,
'img_src' => '/shared/images/new.folder.gif',
'action_name' => strings :: get('create_faq_folder','faq'),
'can_have_access_template' => true,
),
'publish' => array(
'permissions_required' => 'w',
'popup' => true,
'JIP' => true,
'action_name' => strings :: get('publish'),
'action_path' => '/doc_flow_object/set_publish_status_action',
'img_src' => '/shared/images/publish.gif',
'can_have_access_template' => true,
),
'unpublish' => array(
'permissions_required' => 'w',
'popup' => true,
'JIP' => true,
'action_name' => strings :: get('unpublish'),
'action_path' => '/doc_flow_object/set_publish_status_action',
'img_src' => '/shared/images/unpublish.gif',
'can_have_access_template' => true,
),
'delete' => array(
'permissions_required' => 'w',
'JIP' => true,
'popup' => true,
'action_name' => strings :: get('delete_faq_folder','faq'),
'action_path' => '/faq_folder/delete_faq_folder_action',
'template_path' => '/site_object/delete.html',
'img_src' => '/shared/images/rem.gif'
),
);
parent :: site_object_controller();
}
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:52,代码来源:faq_folder_container_controller.class.php
示例19: _valid_perform
function _valid_perform(&$request, &$response)
{
$node_id = $this->dataspace->get('id');
if (!($object = wrap_with_site_object(fetch_one_by_node_id($node_id)))) {
$request->set_status(REQUEST_STATUS_FAILURE);
return;
}
$object->set_attribute('controller_id', site_object_controller::get_id($this->dataspace->get('controller_name')));
$object->update(false);
$request->set_status(REQUEST_STATUS_SUCCESS);
if ($request->has_attribute('popup')) {
$response->write(close_popup_response($request));
}
}
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:14,代码来源:change_controller_action.class.php
示例20: _define_actions
function _define_actions()
{
return array(
'display' => array(
'template_path' => '/announce_object/display.html',
),
'admin_detail' => array(
'template_path' => '/admin/object_detail_info.html',
'popup' => true,
'JIP' => true,
'icon' => 'admin_detail',
'action_name' => strings :: get('detail_info'),
),
'edit' => array(
'popup' => true,
'JIP' => true,
'action_name' => strings :: get('edit_announce', 'announce'),
'action_path' => '/announce_object/edit_announce_action',
'template_path' => '/announce_object/edit.html',
'icon' => 'edit'
),
'publish' => array(
'popup' => true,
'JIP' => true,
'action_name' => strings :: get('publish'),
'action_path' => '/doc_flow_object/set_publish_status_action',
'icon' => 'publish',
'can_have_access_template' => true,
),
'unpublish' => array(
'popup' => true,
'JIP' => true,
'action_name' => strings :: get('unpublish'),
'action_path' => '/doc_flow_object/set_publish_status_action',
'icon' => 'unpublish',
'can_have_access_template' => true,
),
'delete' => array(
'JIP' => true,
'popup' => true,
'action_name' => strings :: get('delete_announce', 'announce'),
'action_path' => 'form_delete_site_object_action',
'template_path' => '/site_object/delete.html',
'icon' => 'delete'
),
);
parent :: site_object_controller();
}
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:50,代码来源:announce_object_controller.class.php
注:本文中的site_object_controller类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论