Skip to content

Instantly share code, notes, and snippets.

@jmertic
Created May 16, 2011 03:04
Show Gist options
  • Select an option

  • Save jmertic/973853 to your computer and use it in GitHub Desktop.

Select an option

Save jmertic/973853 to your computer and use it in GitHub Desktop.
<?php
$dictionary['test_flexparent']['fields']['parent_name'] = array(
'required' => false,
'source' => 'non-db',
'name' => 'parent_name',
'vname' => 'LBL_FLEX_RELATE',
'type' => 'parent',
'massupdate' => 0,
'comments' => '',
'help' => '',
'importable' => 'true',
'duplicate_merge' => 'disabled',
'duplicate_merge_dom_value' => '0',
'audited' => false,
'reportable' => true,
'len' => 25,
'size' => '20',
'options' => 'test_flexparent_options',
'studio' => 'visible',
'type_name' => 'parent_type',
'id_name' => 'parent_id',
'parent_type' => 'test_flexparent_options',
);
$dictionary['test_flexparent']['fields']['parent_type'] = array(
'required' => false,
'name' => 'parent_type',
'vname' => 'LBL_PARENT_TYPE',
'type' => 'parent_type',
'massupdate' => 0,
'comments' => '',
'help' => '',
'importable' => 'true',
'duplicate_merge' => 'disabled',
'duplicate_merge_dom_value' => 0,
'audited' => false,
'reportable' => true,
'len' => 255,
'size' => '20',
'dbType' => 'varchar',
'studio' => 'hidden',
);
$dictionary['test_flexparent']['fields']['parent_id'] = array(
'required' => false,
'name' => 'parent_id',
'vname' => 'LBL_PARENT_ID',
'type' => 'id',
'massupdate' => 0,
'comments' => '',
'help' => '',
'importable' => 'true',
'duplicate_merge' => 'disabled',
'duplicate_merge_dom_value' => 0,
'audited' => false,
'reportable' => true,
'len' => 36,
'size' => '20',
);
$dictionary['test_flexparent']['fields']['contacts'] = array(
'name' => 'contacts',
'type' => 'link',
'relationship' => 'test_flexparent_contacts',
'module'=>'Contacts',
'bean_name'=>'Contact',
'source'=>'non-db',
'vname'=>'LBL_CONTACTS',
);
$dictionary['test_flexparent']['fields']['leads'] = array(
'name' => 'leads',
'type' => 'link',
'relationship' => 'test_flexparent_leads',
'module'=>'Leads',
'bean_name'=>'Lead',
'source'=>'non-db',
'vname'=>'LBL_LEADS',
);
$dictionary['test_flexparent']['relationships']['test_flexparent_contacts'] = array(
'lhs_module' => 'test_flexparent',
'lhs_table' => 'test_flexparent',
'lhs_key' => 'parent_id',
'rhs_module' => 'Contacts',
'rhs_table' => 'contacts',
'rhs_key' => 'id',
'relationship_type' => 'one-to-many',
'relationship_role_column'=>'parent_type',
'relationship_role_column_value'=>'Contacts'
);
$dictionary['test_flexparent']['relationships']['test_flexparent_leads'] = array(
'lhs_module' => 'test_flexparent',
'lhs_table' => 'test_flexparent',
'lhs_key' => 'parent_id',
'rhs_module' => 'Leads',
'rhs_table' => 'leads',
'rhs_key' => 'id',
'relationship_type' => 'one-to-many',
'relationship_role_column'=>'parent_type',
'relationship_role_column_value'=>'Leads'
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment