'cv', 'ItemClass' => Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'), 'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'), 'EventHandlerClass' => Array('class'=>'CustomValuesEventHandler','file'=>'custom_value_event_handler.php','build_event'=>'OnBuild'), 'TagProcessorClass' => Array('class'=>'kDBTagProcessor','file'=>'','build_event'=>'OnBuild'), 'Clones' => Array( 'cv-l' => Array( 'ParentPrefix' => 'l', 'Hooks' => Array( Array( 'Mode' => hAFTER, 'Conditional' => true, 'HookToPrefix' => 'l', 'HookToSpecial' => '', 'HookToEvent' => Array( 'onPreSave' ), 'DoPrefix' => '', 'DoSpecial' => '', 'DoEvent' => 'onPreSave', ), Array( 'Mode' => hAFTER, 'Conditional' => true, 'HookToPrefix' => 'l', 'HookToSpecial' => '', 'HookToEvent' => Array( 'onPreSave' ), 'DoPrefix' => '', 'DoSpecial' => 'general', 'DoEvent' => 'onPreSave', ), ), ), 'cv' => Array( 'Hooks' => Array( Array( 'Mode' => hAFTER, 'Conditional' => true, 'HookToPrefix' => 'p', 'HookToSpecial' => '', 'HookToEvent' => Array( 'onPreSave' ), 'DoPrefix' => '', 'DoSpecial' => '', 'DoEvent' => 'onPreSave', ), Array( 'Mode' => hAFTER, 'Conditional' => true, 'HookToPrefix' => 'p', 'HookToSpecial' => '', 'HookToEvent' => Array( 'onPreSave' ), 'DoPrefix' => '', 'DoSpecial' => 'general', 'DoEvent' => 'onPreSave', ), ), ), ), 'AutoLoad' => true, 'QueryString' => Array( 1 => 'id', 2 => 'page', 3 => 'event', ), 'TableName' => TABLE_PREFIX.'CustomMetaData', 'IDField' => 'CustomDataId', // in this case idfield doesn't exit in destination table 'ParentTableKey'=> 'ResourceId', 'ForeignKey' => 'ResourceId', 'ParentPrefix' => 'p', 'AutoDelete' => true, 'AutoClone' => true, 'CalculatedFields' => Array( '' => Array ( 'FieldName' => 'cf.FieldName', 'Prompt' => 'cf.Prompt', 'CustomFieldId' => 'cf.CustomFieldId', 'ElementType' => 'cf.ElementType', 'ValueList' => 'cf.ValueList', 'DisplayOrder' => 'cf.DisplayOrder', 'CustomDataId' => '%1$s.CustomDataId', ) ), 'ListSQLs' => Array( '' => ' SELECT %1$s.l1_Value AS l1_Value, #ITEM_RESOURCE_ID# AS ResourceId %2$s FROM '.TABLE_PREFIX.'CustomField AS cf LEFT JOIN %1$s ON %1$s.CustomFieldId = cf.CustomFieldId AND ResourceId = #ITEM_RESOURCE_ID#', ), // key - special, value - list select sql 'ItemSQLs' => Array( ''=>'SELECT * FROM %s', ), 'ListSortings' => Array( '' => Array( 'ForcedSorting' => Array('DisplayOrder' => 'asc', 'FieldName' => 'asc'), ) ), 'Fields' => Array( 'CustomDataId' => Array(), 'CustomFieldId' => Array('not_null' => '1', 'default'=>''), 'ResourceId' => Array('not_null' => 1, 'default' => 0), 'Value' => Array('not_null' => true, 'formatter' => 'kMultiLanguage', 'default' => ''), ), 'VirtualFields' => Array( 'FieldName' => Array(), 'Prompt' => Array(), 'ElementType' => Array(), 'ValueList' => Array(), ), 'Grids' => Array( 'Default' => Array( 'Icons' => Array('default'=>'icon16_custom.gif'), // icons for each StatusField values, if no matches or no statusfield selected, then "default" icon is used 'Fields' => Array( 'FieldName' => Array( 'title'=>'la_col_FieldName', 'data_block' => 'grid_icon_td'), 'Prompt' => Array( 'title'=>'la_col_Prompt', 'data_block' => 'grid_data_label_ml_td' ), 'Value' => Array( 'title'=>'la_col_Value', 'data_block' => 'edit_custom_td'), ), ), ), ); ?>