You are here

registration_handler_field_entity_datetime.php in Entity Registration 8

Same filename and directory in other branches
  1. 8.2 src/registration_handler_field_entity_datetime.php

Display registration open or closing dates.

File

src/registration_handler_field_entity_datetime.php
View source
<?php

namespace Drupal\registration;


/**
 * @file
 * Display registration open or closing dates.
 */
class registration_handler_field_entity_datetime extends views_handler_field_date {
  function render($values) {
    $alias = isset($field) ? $this->aliases[$field] : $this->field_alias;
    if (isset($values->{$alias})) {
      $values->{$alias} = strtotime($values->{$alias});
      if ($values->{$alias} !== FALSE) {
        return parent::render($values);
      }
    }
  }

}

Classes

Namesort descending Description
registration_handler_field_entity_datetime @file Display registration open or closing dates.