'manuf', 'ItemClass' => Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'), 'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'), 'EventHandlerClass' => Array('class'=>'ManufacturersEventHandler','file'=>'manufacturers_event_handler.php','build_event'=>'OnBuild'), 'TagProcessorClass' => Array('class'=>'ManufacturersTagProcessor','file'=>'manufacturers_tag_processor.php','build_event'=>'OnBuild'), 'AutoLoad' => true, 'Hooks' => Array( Array( 'Mode' => hAFTER, 'Conditional' => false, 'HookToPrefix' => 'manuf', 'HookToSpecial' => '', 'HookToEvent' => Array('OnAfterItemLoad', 'OnBeforeItemCreate', 'OnBeforeItemUpdate', 'OnUpdateAddress'), 'DoPrefix' => '', 'DoSpecial' => '', 'DoEvent' => 'OnPrepareStates', ), ), 'QueryString' => Array( 1 => 'id', 2 => 'Page', 3 => 'event', 4 => 'mode', ), 'IDField' => 'ManufacturerId', 'StatusField' => Array(), 'TableName' => TABLE_PREFIX.'Manufacturers', 'TitlePresets' => Array( 'default' => Array( 'new_status_labels' => Array('manuf'=>'!la_title_AddingManufacturer!'), 'edit_status_labels' => Array('manuf'=>'!la_title_EditingManufacturer!'), 'new_titlefield' => Array('manuf'=>'!la_title_NewManufacturers!'), ), 'manuf_list'=>Array( 'prefixes' => Array('manuf_List'), 'format' => "!la_title_Manufacturers! (#manuf_recordcount#)", ), 'manuf_edit'=>Array( 'prefixes' => Array('manuf'), 'new_titlefield' => Array('manuf'=>'!la_title_NewManufacturer!'), 'format' => "#manuf_status# '#manuf_titlefield#' - !la_title_General!", ), ), 'PermSection' => Array('main' => 'in-commerce:manufacturers'), 'Sections' => Array( 'in-commerce:manufacturers' => Array( 'parent' => 'in-commerce', 'icon' => 'manufacturers', 'label' => 'la_tab_Manufacturers', 'url' => Array('t' => 'in-commerce/manufacturers/manufacturers_list', 'pass' => 'm'), 'permissions' => Array('view', 'add', 'edit', 'delete'), 'priority' => 3, 'type' => stTREE, ), ), 'TitleField' => 'Name', // field, used in bluebar when editing existing item 'ListSQLs' => Array( ''=>'SELECT * FROM %s', ), // key - special, value - list select sql 'ItemSQLs' => Array(''=>'SELECT * FROM %s', ), 'ListSortings' => Array( '' => Array( 'Sorting' => Array('Name' => 'asc'), ) ), 'Fields' => Array( 'ManufacturerId' => Array('type' => 'int','not_null' => '1','default' => ''), 'Name' => Array('type' => 'string','not_null' => '1','default' => '', 'required'=>true,'max_len'=>255), 'Description' => Array('type' => 'string','not_null' => '1','default' => ''), 'URL' => Array('type' => 'string','not_null' => '1','default' => '','max_len'=>255), 'Email' => Array('type' => 'string', 'formatter'=>'kFormatter', 'regexp'=>'/^[_a-zA-Z0-9-\.]+@[a-zA-Z0-9-\.]+\.[a-z]{2,4}$/', 'sample_value' => 'email@domain.com', 'not_null' => 0, 'default' => '', 'error_msgs' => Array('invalid_format'=>'!la_invalid_email!') ), 'Phone' => Array('type' => 'string','default' => ''), 'Fax' => Array('type' => 'string','not_null' => '1','default' => ''), 'Address1' => Array('type' => 'string','default' => ''), 'Address2' => Array('type' => 'string', 'not_null' => '1', 'default' => ''), 'City' => Array('type' => 'string','default' => ''), 'State' => Array('formatter'=>'kOptionsFormatter', 'options' => Array(), 'option_key_field'=>'DestAbbr','option_title_field'=>'Translation', 'not_null' => '1','default' => ''), 'Zip' => Array('type' => 'string','default' => ''), 'Country' => Array('formatter'=>'kOptionsFormatter', 'options_sql'=>'SELECT %1$s FROM '.TABLE_PREFIX.'StdDestinations LEFT JOIN '.TABLE_PREFIX.'Phrase ON '.TABLE_PREFIX.'Phrase.Phrase = '.TABLE_PREFIX.'StdDestinations.DestName WHERE DestType=1 AND LanguageId = %2$s ORDER BY Translation', 'option_key_field'=>'DestAbbr','option_title_field'=>'Translation', 'not_null' => '1','default' => ''), ), 'Grids' => Array( 'Default' => Array( 'Icons' => Array('default'=>'icon16_manuf.gif'), 'Fields' => Array( 'ManufacturerId' => Array( 'title'=>'la_col_Id', 'data_block' => 'grid_checkbox_td' ), 'Name' => Array( 'title'=>'la_col_ManufacturerName'), 'URL' => Array( 'title'=>'la_col_URL' ), ), ), ), 'ConfigMapping' => Array( 'PerPage' => 'Comm_Perpage_Manufacturers', 'ShortListPerPage' => 'Comm_Perpage_Manufacturers_Short', ), ); ?>