function field_collection_menu

cis7 field_collection.module field_collection_menu()
cle7 field_collection.module field_collection_menu()
elmsmedia7 field_collection.module field_collection_menu()
icor7 field_collection.module field_collection_menu()
meedjum_blog7 field_collection.module field_collection_menu()
mooc7 field_collection.module field_collection_menu()

Implements hook_menu().

File

sites/all/modules/ulmus/field_collection/field_collection.module, line 629
Module implementing field collection field type.

Code

function field_collection_menu() {
  $items = array();
  if (module_exists('field_ui')) {
    $items['admin/structure/field-collections'] = array(
      'title' => 'Field collections',
      'description' => 'Manage fields on field collections.',
      'page callback' => 'field_collections_overview',
      'access arguments' => array('administer field collections'),
      'type' => MENU_NORMAL_ITEM,
      'file' => 'field_collection.admin.inc',
    );
  }

  // Add menu paths for viewing/editing/deleting field collection items.
  foreach (field_info_fields() as $field) {
    if ($field['type'] == 'field_collection') {
      $path = field_collection_field_get_path($field);
      $count = count(explode('/', $path));

      $items[$path . '/%field_collection_item'] = array(
        'page callback' => 'field_collection_item_page_view',
        'page arguments' => array($count),
        'access callback' => 'field_collection_item_access',
        'access arguments' => array('view', $count),
        'file' => 'field_collection.pages.inc',
      );
      $items[$path . '/%field_collection_item/view'] = array(
        'title' => 'View',
        'type' => MENU_DEFAULT_LOCAL_TASK,
        'weight' => -10,
      );
      $items[$path . '/%field_collection_item/edit'] = array(
        'page callback' => 'drupal_get_form',
        'page arguments' => array('field_collection_item_form', $count),
        'access callback' => 'field_collection_item_access',
        'access arguments' => array('update', $count),
        'title' => 'Edit',
        'type' => MENU_LOCAL_TASK,
        'context' => MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE,
        'file' => 'field_collection.pages.inc',
      );
      $items[$path . '/%field_collection_item/delete'] = array(
        'page callback' => 'drupal_get_form',
        'page arguments' => array('field_collection_item_delete_confirm', $count),
        'access callback' => 'field_collection_item_access',
        'access arguments' => array('delete', $count),
        'title' => 'Delete',
        'type' => MENU_LOCAL_TASK,
        'context' => MENU_CONTEXT_INLINE,
        'file' => 'field_collection.pages.inc',
      );
      // Add entity type and the entity id as additional arguments.
      $items[$path . '/add/%/%'] = array(
        'page callback' => 'field_collection_item_add',
        'page arguments' => array($field['field_name'], $count + 1, $count + 2),
        
        // The pace callback takes care of checking access itself.
        'access callback' => TRUE,
        'file' => 'field_collection.pages.inc',
      );
      // Add menu items for dealing with revisions.
      $items[$path . '/%field_collection_item/revisions/%field_collection_item_revision'] = array(
        'page callback' => 'field_collection_item_page_view',
        'page arguments' => array($count + 2),
        'access callback' => 'field_collection_item_access',
        'access arguments' => array('view', $count + 2),
        'file' => 'field_collection.pages.inc',
      );
    }
  }

  $items['field_collection/ajax'] = array(
    'title' => 'Remove item callback',
    'page callback' => 'field_collection_remove_js',
    'delivery callback' => 'ajax_deliver',
    'access callback' => TRUE,
    'theme callback' => 'ajax_base_page_theme',
    'type' => MENU_CALLBACK,
    'file path' => 'includes',
    'file' => 'form.inc',
  );

  return $items;
}
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.