当前位置: 首页>>代码示例>>PHP>>正文


PHP ModuleBuilderController::action_SaveRelationship方法代码示例

本文整理汇总了PHP中ModuleBuilderController::action_SaveRelationship方法的典型用法代码示例。如果您正苦于以下问题:PHP ModuleBuilderController::action_SaveRelationship方法的具体用法?PHP ModuleBuilderController::action_SaveRelationship怎么用?PHP ModuleBuilderController::action_SaveRelationship使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ModuleBuilderController的用法示例。


在下文中一共展示了ModuleBuilderController::action_SaveRelationship方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: testRemoveCustomFieldFromSubpanelForCustomRelation

 /**
  * Test tries to assert that field is not exist after removal it from subpanel
  * 
  * @group 46196
  */
 public function testRemoveCustomFieldFromSubpanelForCustomRelation()
 {
     $controller = new ModuleBuilderController();
     $module_name = 'Accounts';
     $_REQUEST['view_module'] = $module_name;
     $test_field_name = 'testfield_222222';
     $_REQUEST['name'] = $test_field_name;
     $_REQUEST['labelValue'] = 'testfield 222222';
     $_REQUEST['label'] = 'LBL_TESTFIELD_222222';
     $_REQUEST['type'] = 'varchar';
     $controller->action_SaveField();
     $_REQUEST['view_module'] = $module_name;
     $_REQUEST['relationship_type'] = 'many-to-many';
     $_REQUEST['lhs_module'] = $module_name;
     $_REQUEST['lhs_label'] = $module_name;
     $_REQUEST['rhs_module'] = $module_name;
     $_REQUEST['rhs_label'] = $module_name;
     $_REQUEST['lhs_subpanel'] = 'default';
     $_REQUEST['rhs_subpanel'] = 'default';
     $controller->action_SaveRelationship();
     $parser = ParserFactory::getParser('listview', $module_name, null, 'accounts_accounts');
     $field = $parser->_fielddefs[$test_field_name . '_c'];
     $parser->_viewdefs[$test_field_name . '_c'] = $field;
     $parser->handleSave(false);
     $_REQUEST['type'] = 'varchar';
     $_REQUEST['name'] = $test_field_name . '_c';
     $controller->action_DeleteField();
     $parser = ParserFactory::getParser('listview', $module_name, null, 'accounts_accounts');
     $_REQUEST['relationship_name'] = 'accounts_accounts';
     $controller->action_DeleteRelationship();
     $this->assertArrayNotHasKey($test_field_name . '_c', $parser->_viewdefs);
 }
开发者ID:jgera,项目名称:sugarcrm_dev,代码行数:37,代码来源:Bug46196Test.php


注:本文中的ModuleBuilderController::action_SaveRelationship方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。