home | career | drupal | java | mac | mysql | perl | php | scala | uml | unix

Drupal example source code file (rules_scheduler_views_handler_datetime.inc)

This example Drupal source code file (rules_scheduler_views_handler_datetime.inc) is included in the DevDaily.com "Drupal Source Code Warehouse" project. The intent of this project is to help you "Learn Drupal by Example".

PHP - Drupal tags/keywords

class, extends, function, parent::render, php, render, return, rules_gmstrtotime, rules_scheduler_views_handler_datetime, value, values, views_handler_field_date

The rules_scheduler_views_handler_datetime.inc Drupal example source code

// $Id: rules_scheduler_views_handler_datetime.inc,v 2009/07/13 13:34:27 fago Exp $

 * @file
 * An extended subclass for datetime handling.
 * We need this to correctly convert our SQL datetime field to local user date/time.
class rules_scheduler_views_handler_datetime extends views_handler_field_date {

  function render($values) {
    $value = $values->{$this->field_alias};
    // overwrite date string with timestamp
    $values->{$this->field_alias} = rules_gmstrtotime($value);
    // call parent method with modified values
    return parent::render($values);

Other Drupal examples (source code examples)

Here is a short list of links related to this Drupal rules_scheduler_views_handler_datetime.inc source code file:

new blog posts

"Drupal" is a registered trademark of Dries Buytaert.

my drupal tutorials and examples  

Copyright 1998-2016 Alvin Alexander, alvinalexander.com
All Rights Reserved.

Beginning in 2016, a portion of the proceeds from pages under the '/drupal-code-examples/' URI will be donated to charity.