// -- currently known functionality
include($modx->config[’base_path’]."assets/modules/module_admin/module_admin.php");
$admin_object = new module_admin();
$admin_object->modx = $modx;
$admin_object->table = $admin_object->modx->getFullTableName(’Table_name’) ;
$admin_object->admin_title = ’Custom module administration’;
$admin_object->admin_query = ’query including joins where needed’;
$admin_object->admin_columns = array(
// all fields to show in the list
’table_column_name’=>’user_friendly_name’
,’xxx’=>’yyy’
);
$admin_object->new_link = ’Caption for new object’;
$admin_object->admin_empty = ’Caption for no records found’;
$admin_object->edit_page_title = ’Caption for editing page’;
$admin_object->new_page_title = ’Caption for creating object page’;
$arrDropDownItems = $admin_object->populateDropdown( array( ’unique identifier’, ’table_column_name’ ), ’modx_table_name’, ’conditional equation (true/false as result)’, ’user_friendly_name’, ’ASC’ ) ;
$admin_object->edit_fields = array(
’table_column_name1’ => array( ’type’ =>’text’, ’label’ => ’user_friendly_name’, ’validate_compulsory’ => ’yes’),
’table_column_name2’ => array( ’type’ =>’dropdown’, ’label’ => ’user_friendly_name’, ’values’ => $arrDropDownItems, ’validate_compulsory’ => ’yes’),
);
print $admin_object->display();
// -- wanted information on the following functionality, and more if available
$admin_object->admin_items_per_page
$admin_object->param_error
$admin_object->filter_fields
$admin_object->Edit_query
etcetera..
charliez :
do you have a link or something to describe what you mean (i cannot find anything good Modx related answers from google)
scotwell :
i already found your short tutorial but unfortunaltely this is not what i’m looking for.