PHP Класс 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.
Наследование: extends Form
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$types
$widgets

Открытые методы

Метод Описание
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 ( )

Защищенные методы

Метод Описание
configure ( ) {@inheritDoc}
generatePaddedChoices ( array $values, integer $padLength ) : array Generates an array of choices for the given values

Описание методов

configure() защищенный Метод

{@inheritDoc}
protected configure ( )

generatePaddedChoices() защищенный Метод

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
Результат array An array with the input values as keys and the padded values as values

isField() публичный Метод

public isField ( )

isHourWithinRange() публичный Метод

The hour is valid if it is contained in the list passed to the field's option "hours".
public isHourWithinRange ( ) : boolean
Результат boolean

isMinuteWithinRange() публичный Метод

The minute is valid if it is contained in the list passed to the field's option "minutes".
public isMinuteWithinRange ( ) : boolean
Результат boolean

isSecondWithinRange() публичный Метод

The second is valid if it is contained in the list passed to the field's option "seconds".
public isSecondWithinRange ( ) : boolean
Результат boolean

isWithSeconds() публичный Метод

public isWithSeconds ( )

Описание свойств

$types защищенное статическое свойство

protected static $types

$widgets защищенное статическое свойство

protected static $widgets