PHP Class Symfony\Component\Form\TimeField

Available options: * widget: How to render the time field ("input" or "choice"). Default: "choice". * type: The type of the date stored on the object. Default: "datetime": * datetime: A DateTime object; * string: A raw string (e.g. 2011-05-01 12:30:00, Y-m-d H:i:s); * timestamp: A unix timestamp (e.g. 1304208000). * raw: An hour, minute, second array * with_seconds Whether or not to create a field for seconds. Default: false. * hours: An array of hours for the hour select tag. * minutes: An array of minutes for the minute select tag. * seconds: An array of seconds for the second select tag. * data_timezone: The timezone of the data. Default: UTC. * user_timezone: The timezone of the user entering a new value. Default: UTC.
Inheritance: extends Form
ファイルを表示 Open project: pmjones/php-framework-benchmarks Class Usage Examples

Protected Properties

Property Type Description
$types
$widgets

Public Methods

Method Description
isField ( )
isHourWithinRange ( ) : boolean Returns whether the hour of the field's data is valid
isMinuteWithinRange ( ) : boolean Returns whether the minute of the field's data is valid
isSecondWithinRange ( ) : boolean Returns whether the second of the field's data is valid
isWithSeconds ( )

Protected Methods

Method Description
configure ( ) {@inheritDoc}
generatePaddedChoices ( array $values, integer $padLength ) : array Generates an array of choices for the given values

Method Details

configure() protected method

{@inheritDoc}
protected configure ( )

generatePaddedChoices() protected method

If the values are shorter than $padLength characters, they are padded with zeros on the left side.
protected generatePaddedChoices ( array $values, integer $padLength ) : array
$values array The available choices
$padLength integer The length to pad the choices
return array An array with the input values as keys and the padded values as values

isField() public method

public isField ( )

isHourWithinRange() public method

The hour is valid if it is contained in the list passed to the field's option "hours".
public isHourWithinRange ( ) : boolean
return boolean

isMinuteWithinRange() public method

The minute is valid if it is contained in the list passed to the field's option "minutes".
public isMinuteWithinRange ( ) : boolean
return boolean

isSecondWithinRange() public method

The second is valid if it is contained in the list passed to the field's option "seconds".
public isSecondWithinRange ( ) : boolean
return boolean

isWithSeconds() public method

public isWithSeconds ( )

Property Details

$types protected_oe static_oe property

protected static $types

$widgets protected_oe static_oe property

protected static $widgets