PHP Class PodsField_Time, pods

Inheritance: extends PodsField
Mostra file Open project: pods-framework/pods

Public Properties

Property Type Description
$group string Field Type Group
$label string Field Type Label
$prepare string Field Type Preparation
$type string Field Type Identifier

Public Methods

Method Description
__construct ( ) Do things like register/enqueue scripts and stylesheets
convert_date ( $value, $new_format, $original_format = 'H:i:s' ) Convert a date from one format to another
createFromFormat ( $format, $date ) : DateTime
display ( mixed $value = null, string $name = null, array $options = null, array $pod = null, integer $id = null ) : mixed | null | string Change the way the value of the field is displayed with Pods::get
format ( $options ) : string Build date/time format string based on options
input ( string $name, mixed $value = null, array $options = null, array $pod = null, integer $id = null ) Customize output of the form field
options ( ) : array Add options and set defaults to
pre_save ( mixed $value, integer $id = null, string $name = null, array $options = null, array $fields = null, array $pod = null, object $params = null ) : mixed | string Change the value or perform actions after validation but before saving to the DB
schema ( array $options = null ) : array Define the current field's schema for DB table storage
ui ( integer $id, mixed $value, string $name = null, array $options = null, array $fields = null, array $pod = null ) : mixed | null | string Customize the Pods UI manage table column output

Method Details

__construct() public method

Do things like register/enqueue scripts and stylesheets
Since: 2.0
public __construct ( )

convert_date() public method

Convert a date from one format to another
public convert_date ( $value, $new_format, $original_format = 'H:i:s' )
$new_format
$original_format

createFromFormat() public method

public createFromFormat ( $format, $date ) : DateTime
$format
$date
return DateTime

display() public method

Change the way the value of the field is displayed with Pods::get
Since: 2.0
public display ( mixed $value = null, string $name = null, array $options = null, array $pod = null, integer $id = null ) : mixed | null | string
$value mixed
$name string
$options array
$pod array
$id integer
return mixed | null | string

format() public method

Build date/time format string based on options
Since: 2.0
public format ( $options ) : string
$options
return string

input() public method

Customize output of the form field
Since: 2.0
public input ( string $name, mixed $value = null, array $options = null, array $pod = null, integer $id = null )
$name string
$value mixed
$options array
$pod array
$id integer

options() public method

Add options and set defaults to
Since: 2.0
public options ( ) : array
return array

pre_save() public method

Change the value or perform actions after validation but before saving to the DB
Since: 2.0
public pre_save ( mixed $value, integer $id = null, string $name = null, array $options = null, array $fields = null, array $pod = null, object $params = null ) : mixed | string
$value mixed
$id integer
$name string
$options array
$fields array
$pod array
$params object
return mixed | string

schema() public method

Define the current field's schema for DB table storage
Since: 2.0
public schema ( array $options = null ) : array
$options array
return array

ui() public method

Customize the Pods UI manage table column output
Since: 2.0
public ui ( integer $id, mixed $value, string $name = null, array $options = null, array $fields = null, array $pod = null ) : mixed | null | string
$id integer
$value mixed
$name string
$options array
$fields array
$pod array
return mixed | null | string

Property Details

$group public_oe static_oe property

Field Type Group
Since: 2.0
public static string $group
return string

$label public_oe static_oe property

Field Type Label
Since: 2.0
public static string $label
return string

$prepare public_oe static_oe property

Field Type Preparation
Since: 2.0
public static string $prepare
return string

$type public_oe static_oe property

Field Type Identifier
Since: 2.0
public static string $type
return string