/[drupal]/contributions/modules/index/index.module
ViewVC logotype

Diff of /contributions/modules/index/index.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.1.2.12 by xano, Tue Nov 17 17:46:41 2009 UTC revision 1.1.2.13 by xano, Tue Nov 17 22:34:07 2009 UTC
# Line 1  Line 1 
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
# Line 63  function index_menu() { Line 63  function index_menu() {
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',
# Line 83  function index_theme($existing, $type, $ Line 83  function index_theme($existing, $type, $
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(),
# Line 145  function index_index_mode_info() { Line 140  function index_index_mode_info() {
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',
# Line 153  function index_index_mode_info() { Line 149  function index_index_mode_info() {
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',
# Line 161  function index_index_mode_info() { Line 159  function index_index_mode_info() {
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',
# Line 186  function index_index_entity_type_info() Line 186  function index_index_entity_type_info()
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'),
# Line 197  function index_index_entity_type_info() Line 205  function index_index_entity_type_info()
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'),
# Line 209  function index_index_entity_type_info() Line 225  function index_index_entity_type_info()
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',
# Line 223  function index_index_entity_type_info() Line 243  function index_index_entity_type_info()
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',
# Line 238  function index_index_entity_type_info() Line 262  function index_index_entity_type_info()
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',
# Line 254  function index_index_entity_type_info() Line 282  function index_index_entity_type_info()
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'),
# Line 265  function index_index_entity_type_info() Line 301  function index_index_entity_type_info()
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;
# Line 286  function index_modes_get() { Line 330  function index_modes_get() {
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;
# Line 309  function index_entity_types_get() { Line 355  function index_entity_types_get() {
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;
# Line 328  function index_entity_types_get() { Line 375  function index_entity_types_get() {
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);

Legend:
Removed from v.1.1.2.12  
changed lines
  Added in v.1.1.2.13

  ViewVC Help
Powered by ViewVC 1.1.3