function eva_field_extra_fields

cis7 eva.module eva_field_extra_fields()
cle7 eva.module eva_field_extra_fields()
elmsmedia7 eva.module eva_field_extra_fields()
icor7 eva.module eva_field_extra_fields()
meedjum_blog7 eva.module eva_field_extra_fields()
mooc7 eva.module eva_field_extra_fields()

Implements hook_content_extra_fields().

File

sites/all/modules/ulmus/eva/eva.module, line 19

Code

function eva_field_extra_fields() {
  $extras = array();
  $views = eva_get_views();

  foreach ($views as $entity => $data) {
    foreach ($data as $view) {
      foreach ($view['bundles'] as $bundle) {
        $extras[$entity][$bundle]['display'][$view['name'] . '_' . $view['display']] = array(
          'label' => (empty($view['title'])) ? $view['name'] : $view['title'],
          'description' => $view['title'],
          'weight' => 10,
        );
        // Provide a separate extra field for the exposed form if there is any.
        if ($view['exposed form']) {
          $extras[$entity][$bundle]['display'][$view['name'] . '_' . $view['display'] . '_' . 'form'] = array(
            'label' => ((empty($view['title'])) ? $view['name'] : $view['title']) . ' (' . t('Exposed form') . ')',
            'description' => t('The exposed filter form of the view.'),
            'weight' => 9,
          );
        }
      }
    }
  }

  return $extras;
}
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.