function date_repeat_field_bundles

cis7 date_repeat_field.module date_repeat_field_bundles()
cle7 date_repeat_field.module date_repeat_field_bundles()
elmsmedia7 date_repeat_field.module date_repeat_field_bundles()
icor7 date_repeat_field.module date_repeat_field_bundles()
meedjum_blog7 date_repeat_field.module date_repeat_field_bundles()
mooc7 date_repeat_field.module date_repeat_field_bundles()

Return an array of all entity types and bundles that have repeating date fields.

1 call to date_repeat_field_bundles()
date_repeat_field_menu in sites/all/modules/ulmus/date/date_repeat_field/date_repeat_field.module
Implements hook_menu().

File

sites/all/modules/ulmus/date/date_repeat_field/date_repeat_field.module, line 162
Creates the option of Repeating date fields and manages Date fields that use the Date Repeat API.

Code

function date_repeat_field_bundles() {
  $values = array();
  foreach (field_info_fields() as $field_name => $field) {
    if (in_array($field['type'], array('date', 'datestamp', 'datetime')) && $field['settings']['repeat']) {
      foreach ($field['bundles'] as $entity_type => $bundles) {
        foreach ($bundles as $bundle) {
          $values[$entity_type][$bundle][] = $field_name;
        }
      }
    }
  }
  return $values;
}
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.