本文整理汇总了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);
}