| 1 |
<?php |
<?php |
| 2 |
// $Id: index.module,v 1.1.2.11 2009/11/17 16:08:36 xano Exp $ |
// $Id: index.module,v 1.1.2.12 2009/11/17 17:46:41 xano Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* @file |
* @file |
| 63 |
$items['admin/build/index/preview'] = array( |
$items['admin/build/index/preview'] = array( |
| 64 |
'title' => 'Preview index', |
'title' => 'Preview index', |
| 65 |
'access arguments' => array('administer index'), |
'access arguments' => array('administer index'), |
| 66 |
'page callback' => 'index_preview', |
'page callback' => 'index_preview_live', |
| 67 |
'type' => MENU_CALLBACK, |
'type' => MENU_CALLBACK, |
| 68 |
'file' => 'index.admin.inc', |
'file' => 'index.admin.inc', |
| 69 |
'file path' => drupal_get_path('module', 'index') . '/includes', |
'file path' => drupal_get_path('module', 'index') . '/includes', |
| 83 |
'list' => '', |
'list' => '', |
| 84 |
), |
), |
| 85 |
), |
), |
|
'index_preview_title' => array ( |
|
|
'arguments' => array( |
|
|
'title' => '', |
|
|
), |
|
|
), |
|
| 86 |
'index_form_add' => array( |
'index_form_add' => array( |
| 87 |
'arguments' => array( |
'arguments' => array( |
| 88 |
'form' => array(), |
'form' => array(), |
| 140 |
'#title' => t('Tree'), |
'#title' => t('Tree'), |
| 141 |
'#page' => TRUE, |
'#page' => TRUE, |
| 142 |
'#block' => TRUE, |
'#block' => TRUE, |
| 143 |
|
'#depth_data' => 0, |
| 144 |
'#callback_info' => array( |
'#callback_info' => array( |
| 145 |
'#callback' => 'index_render_tree', |
'#callback' => 'index_render_tree', |
| 146 |
'#file' => '/includes/index.view.inc', |
'#file' => '/includes/index.view.inc', |
| 149 |
$modes['browsable'] = array( |
$modes['browsable'] = array( |
| 150 |
'#title' => t('Browsable'), |
'#title' => t('Browsable'), |
| 151 |
'#page' => TRUE, |
'#page' => TRUE, |
| 152 |
|
'#depth_data' => 1, |
| 153 |
|
'#depth_count' => 2, |
| 154 |
'#callback_info' => array( |
'#callback_info' => array( |
| 155 |
'#callback' => 'index_render_browsable', |
'#callback' => 'index_render_browsable', |
| 156 |
'#file' => '/includes/index.view.inc', |
'#file' => '/includes/index.view.inc', |
| 159 |
$modes['flat'] = array( |
$modes['flat'] = array( |
| 160 |
'#title' => t('Flat (top level only)'), |
'#title' => t('Flat (top level only)'), |
| 161 |
'#block' => TRUE, |
'#block' => TRUE, |
| 162 |
|
'#depth_data' => 1, |
| 163 |
|
'#depth_count' => 2, |
| 164 |
'#callback_info' => array( |
'#callback_info' => array( |
| 165 |
'#callback' => 'index_render_flat', |
'#callback' => 'index_render_flat', |
| 166 |
'#file' => '/includes/index.view.inc', |
'#file' => '/includes/index.view.inc', |
| 186 |
'#callback' => 'index_data_get_node', |
'#callback' => 'index_data_get_node', |
| 187 |
'#file' => 'includes/index.data.inc', |
'#file' => 'includes/index.data.inc', |
| 188 |
), |
), |
| 189 |
|
'#count_callback_info' => array( |
| 190 |
|
'#callback' => 'index_data_count_node', |
| 191 |
|
'#file' => 'includes/index.data.inc', |
| 192 |
|
), |
| 193 |
|
'#theme_info' => array( |
| 194 |
|
'#theme' => 'index_data_node', |
| 195 |
|
'#file' => 'includes/index.view.inc', |
| 196 |
|
), |
| 197 |
); |
); |
| 198 |
$entities['node_type'] = array( |
$entities['node_type'] = array( |
| 199 |
'#title' => t('Content types'), |
'#title' => t('Content types'), |
| 205 |
'#callback' => 'index_data_get_node_type', |
'#callback' => 'index_data_get_node_type', |
| 206 |
'#file' => 'includes/index.data.inc', |
'#file' => 'includes/index.data.inc', |
| 207 |
), |
), |
| 208 |
|
'#count_callback_info' => array( |
| 209 |
|
'#callback' => 'index_data_count_node_type', |
| 210 |
|
'#file' => 'includes/index.data.inc', |
| 211 |
|
), |
| 212 |
|
'#theme_info' => array( |
| 213 |
|
'#theme' => 'index_data_node_type', |
| 214 |
|
'#file' => 'includes/index.view.inc', |
| 215 |
|
), |
| 216 |
); |
); |
| 217 |
$entities['user'] = array( |
$entities['user'] = array( |
| 218 |
'#title' => t('Users'), |
'#title' => t('Users'), |
| 225 |
'#callback' => 'index_data_get_user', |
'#callback' => 'index_data_get_user', |
| 226 |
'#file' => 'includes/index.data.inc', |
'#file' => 'includes/index.data.inc', |
| 227 |
), |
), |
| 228 |
|
'#count_callback_info' => array( |
| 229 |
|
'#callback' => 'index_data_count_user', |
| 230 |
|
'#file' => 'includes/index.data.inc', |
| 231 |
|
), |
| 232 |
'#theme_info' => array( |
'#theme_info' => array( |
| 233 |
'#theme' => 'index_data_user', |
'#theme' => 'index_data_user', |
| 234 |
'#file' => 'includes/index.view.inc', |
'#file' => 'includes/index.view.inc', |
| 243 |
'#callback' => 'index_data_get_user_role', |
'#callback' => 'index_data_get_user_role', |
| 244 |
'#file' => 'includes/index.data.inc', |
'#file' => 'includes/index.data.inc', |
| 245 |
), |
), |
| 246 |
|
'#count_callback_info' => array( |
| 247 |
|
'#callback' => 'index_data_count_user_role', |
| 248 |
|
'#file' => 'includes/index.data.inc', |
| 249 |
|
), |
| 250 |
'#theme_info' => array( |
'#theme_info' => array( |
| 251 |
'#theme' => 'index_data_user_role', |
'#theme' => 'index_data_user_role', |
| 252 |
'#file' => 'includes/index.view.inc', |
'#file' => 'includes/index.view.inc', |
| 262 |
'#callback' => 'index_data_get_comment', |
'#callback' => 'index_data_get_comment', |
| 263 |
'#file' => 'includes/index.data.inc', |
'#file' => 'includes/index.data.inc', |
| 264 |
), |
), |
| 265 |
|
'#count_callback_info' => array( |
| 266 |
|
'#callback' => 'index_data_count_comment', |
| 267 |
|
'#file' => 'includes/index.data.inc', |
| 268 |
|
), |
| 269 |
'#theme_info' => array( |
'#theme_info' => array( |
| 270 |
'#theme' => 'index_data_comment', |
'#theme' => 'index_data_comment', |
| 271 |
'#file' => 'includes/index.view.inc', |
'#file' => 'includes/index.view.inc', |
| 282 |
'#callback' => 'index_data_get_taxonomy_term', |
'#callback' => 'index_data_get_taxonomy_term', |
| 283 |
'#file' => 'includes/index.data.inc', |
'#file' => 'includes/index.data.inc', |
| 284 |
), |
), |
| 285 |
|
'#count_callback_info' => array( |
| 286 |
|
'#callback' => 'index_data_count_taxonomy_term', |
| 287 |
|
'#file' => 'includes/index.data.inc', |
| 288 |
|
), |
| 289 |
|
'#theme_info' => array( |
| 290 |
|
'#theme' => 'index_data_taxonomy_term', |
| 291 |
|
'#file' => 'includes/index.view.inc', |
| 292 |
|
), |
| 293 |
); |
); |
| 294 |
$entities['taxonomy_vocabulary'] = array( |
$entities['taxonomy_vocabulary'] = array( |
| 295 |
'#title' => t('Vocabularies'), |
'#title' => t('Vocabularies'), |
| 301 |
'#callback' => 'index_data_get_taxonomy_vocabulary', |
'#callback' => 'index_data_get_taxonomy_vocabulary', |
| 302 |
'#file' => 'includes/index.data.inc', |
'#file' => 'includes/index.data.inc', |
| 303 |
), |
), |
| 304 |
|
'#count_callback_info' => array( |
| 305 |
|
'#callback' => 'index_data_count_taxonomy_vocabulary', |
| 306 |
|
'#file' => 'includes/index.data.inc', |
| 307 |
|
), |
| 308 |
|
'#theme_info' => array( |
| 309 |
|
'#theme' => 'index_data_taxonomy_vocabulary', |
| 310 |
|
'#file' => 'includes/index.view.inc', |
| 311 |
|
), |
| 312 |
); |
); |
| 313 |
|
|
| 314 |
return $entities; |
return $entities; |
| 330 |
$module_mode += array( |
$module_mode += array( |
| 331 |
'#page' => FALSE, |
'#page' => FALSE, |
| 332 |
'#block' => FALSE, |
'#block' => FALSE, |
| 333 |
|
'#depth_data' => 0, |
| 334 |
|
'#depth_count' => isset($module_mode['#depth_data']) ? $module_mode['#depth_data'] : 0, |
| 335 |
); |
); |
| 336 |
} |
} |
| 337 |
$modes += $module_modes; |
$modes += $module_modes; |
| 355 |
$module_modes = call_user_func($module . '_index_entity_type_info'); |
$module_modes = call_user_func($module . '_index_entity_type_info'); |
| 356 |
foreach ($module_modes as &$module_mode) { |
foreach ($module_modes as &$module_mode) { |
| 357 |
$module_mode['#data_callback_info']['#module'] = $module; |
$module_mode['#data_callback_info']['#module'] = $module; |
| 358 |
|
$module_mode['#count_callback_info']['#module'] = $module; |
| 359 |
$module_mode['#theme_info']['#module'] = $module; |
$module_mode['#theme_info']['#module'] = $module; |
| 360 |
} |
} |
| 361 |
$entity_types += $module_modes; |
$entity_types += $module_modes; |
| 375 |
* @param ... |
* @param ... |
| 376 |
* Additional arguments to pass on to the callback. |
* Additional arguments to pass on to the callback. |
| 377 |
*/ |
*/ |
| 378 |
function index_callback_execute($callback_info) {echo gettype($callback_info); |
function index_callback_execute($callback_info) { |
|
if (is_null($callback_info)) {print_r(debug_backtrace());} |
|
| 379 |
require_once('./'. drupal_get_path('module', $callback_info['#module']) . '/' . $callback_info['#file']); |
require_once('./'. drupal_get_path('module', $callback_info['#module']) . '/' . $callback_info['#file']); |
| 380 |
$args = func_get_args(); |
$args = func_get_args(); |
| 381 |
array_shift($args); |
array_shift($args); |