You are here

hijri.views.inc in Hijri 8

Same filename and directory in other branches
  1. 7 views/hijri.views.inc

Views definitions for Hijri module.

File

views/hijri.views.inc
View source
<?php

/**
 * @file
 * Views definitions for Hijri module.
 */

/**
 * Implements hook_views_data_alter().
 */
function hijri_views_data_alter(&$data) {
  foreach ($data as $table => $config) {
    foreach ($config as $item => $item_config) {
      if (isset($item_config['field']['handler']) && $item_config['field']['handler'] == 'views_handler_field_date') {
        $data[$table][$item]['field']['handler'] = 'hijri_handler_hijri_created';
      }
    }
  }
  return $data;
}

/**
 * Implements hook_views_handlers().
 */
function hijri_views_handlers() {
  return array(
    'info' => array(
      'path' => drupal_get_path('module', 'hijri') . '/views',
    ),
    'handlers' => array(
      'hijri_handler_hijri_created' => array(
        'parent' => 'views_handler_field_date',
      ),
    ),
  );
}

Functions

Namesort descending Description
hijri_views_data_alter Implements hook_views_data_alter().
hijri_views_handlers Implements hook_views_handlers().