You are here

class DateTimePropertyType in Entity Construction Kit (ECK) 7.3

Hierarchy

Expanded class hierarchy of DateTimePropertyType

File

./eck.property_type.inc, line 328
Property types.

View source
class DateTimePropertyType implements PropertyTypeInterface {

  /**
   * Schema.
   */
  public static function schema() {
    $schema = array(
      'description' => 'Date/Time',
      'type' => 'datetime',
      'not null' => TRUE,
      'default' => 0,
    );
    return $schema;
  }

  /**
   * Validate.
   */
  public static function validate($value) {
    $number = filter_var($value, FILTER_VALIDATE_FLOAT);
    return $number !== FALSE;
  }

}

Members