Dojo/Form/Element/TimeTextBox.php

Show: inherited
Table of Contents

Zend Framework

LICENSE

This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to [email protected] so we can send you a copy immediately.

Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Dojo  
Subpackage
Form_Element  

\Zend_Dojo_Form_Element_TimeTextBox

Package: Zend\Dojo\Form\Element

TimeTextBox dijit

Parent(s)
\Zend_Dojo_Form_Element_DateTextBox < \Zend_Dojo_Form_Element_ValidationTextBox < \Zend_Dojo_Form_Element_TextBox < \Zend_Dojo_Form_Element_Dijit < \Zend_Form_Element
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Uses
\global\Zend_Dojo_Form_Element_DateTextBox  
Version
$Id: TimeTextBox.php 24593 2012-01-05 20:35:02Z matthew $  

Constants

Properties

Propertyprotectedarray $_allowedFormatTypes = array('long', 'short', 'medium', 'full')
inherited

Allowed formatLength types

Inherited from: \Zend_Dojo_Form_Element_DateTextBox::$$_allowedFormatTypes
Default valuearray('long', 'short', 'medium', 'full')Details
Type
array
Inherited_from
\Zend_Dojo_Form_Element_DateTextBox::$$_allowedFormatTypes  
Propertyprotectedarray $_allowedSelectorTypes = array('time', 'date')
inherited

Allowed selector types

Inherited from: \Zend_Dojo_Form_Element_DateTextBox::$$_allowedSelectorTypes
Default valuearray('time', 'date')Details
Type
array
Inherited_from
\Zend_Dojo_Form_Element_DateTextBox::$$_allowedSelectorTypes  
Propertyprotectedbool $_isPartialRendering = false

This is to allow execution of logic inside the render() methods of child elements during the magic call while skipping the parent render() method.

Default valuefalseDetails
Type
bool
Inherited_from
\Zend_Form_Element::$$_isPartialRendering  
Inherited_from
\Zend_Dojo_Form_Element_Dijit::$$_isPartialRendering  
Inherited_from
\Zend_Dojo_Form_Element_TextBox::$$_isPartialRendering  
Inherited_from
\Zend_Dojo_Form_Element_ValidationTextBox::$$_isPartialRendering  
Inherited_from
\Zend_Dojo_Form_Element_DateTextBox::$$_isPartialRendering  
Propertypublicstring $helper = 'TimeTextBox'

Use TimeTextBox dijit view helper

Default value'TimeTextBox'Details
Type
string

Methods

methodpublic__call(string $method, array $args) : string

Call renderDecoratorName() to render a specific decorator.

Parameters
Name Type Description
$method string
$args array
Returns
Type Description
string
Throws
Exception Description
\Zend_Form_Exception for invalid decorator or invalid method call
methodpublic__construct(mixed $spec, mixed $options = null) : void

$spec may be: - string: name of element - array: options with which to configure element - Zend_Config: Zend_Config with options for configuring element

Parameters
Name Type Description
$spec mixed
$options mixed
Throws
Exception Description
\Zend_Form_Exception if no element name after initialization
methodpublic__get(string $key) : mixed

Prevents access to properties beginning with '_'.

Parameters
Name Type Description
$key string
Returns
Type Description
mixed
methodpublic__set(string $key, mixed $value) : \voide
Parameters
Name Type Description
$key string
$value mixed
Returns
Type Description
\voide
methodprotected_castBoolToString(mixed $item, string $key) : void
Parameters
Name Type Description
$item mixed
$key string
methodprotected_getDecorator(string $name, null | array $options) : \Zend_Form_Decorator_Interface
Parameters
Name Type Description
$name string
$options null | array
Returns
Type Description
\Zend_Form_Decorator_Interface
methodprotected_loadDecorator(array $decorator, mixed $name) : \Zend_Form_Decorator_Interface
Parameters
Name Type Description
$decorator array

Decorator type and options

$name mixed

Decorator name or alias

Returns
Type Description
\Zend_Form_Decorator_Interface
methodprotected_validateIso8601(string $format) : true

Validate ISO 8601 time format

Parameters
Name Type Description
$format string
Returns
Type Description
true
Throws
Exception Description
\Zend_Form_Element_Exception
methodpublicaddDecorator(string | \Zend_Form_Decorator_Interface $decorator, array | \Zend_Config $options = null) : \Zend_Form_Element
Parameters
Name Type Description
$decorator string | \Zend_Form_Decorator_Interface
$options array | \Zend_Config

Options with which to initialize decorator

Returns
Type Description
\Zend_Form_Element
methodpublicaddError(string $message) : \Zend_Form_Element
Parameters
Name Type Description
$message string
Returns
Type Description
\Zend_Form_Element
methodpublicaddErrorMessage(string $message) : \Zend_Form_Element
Parameters
Name Type Description
$message string
Returns
Type Description
\Zend_Form_Element
methodpublicaddErrorMessages(array $messages) : \Zend_Form_Element
Parameters
Name Type Description
$messages array
Returns
Type Description
\Zend_Form_Element
methodpublicaddErrors(array $messages) : \Zend_Form_Element
Parameters
Name Type Description
$messages array
Returns
Type Description
\Zend_Form_Element
methodpublicaddPrefixPath(string $prefix, string $path, string $type = null) : \Zend_Form_Element

If no $type specified, assumes it is a base path for both filters and validators, and sets each according to the following rules: - decorators: $prefix = $prefix . '_Decorator' - filters: $prefix = $prefix . '_Filter' - validators: $prefix = $prefix . '_Validate'

Otherwise, the path prefix is set on the appropriate plugin loader.

Parameters
Name Type Description
$prefix string
$path string
$type string
Returns
Type Description
\Zend_Form_Element
Throws
Exception Description
\Zend_Form_Exception for invalid type
methodpublicaddValidator(string | \Zend_Validate_Interface $validator, bool $breakChainOnFailure = false, array $options = array()) : \Zend_Form_Element

Note: will overwrite existing validators if they are of the same class.

Parameters
Name Type Description
$validator string | \Zend_Validate_Interface
$breakChainOnFailure bool
$options array
Returns
Type Description
\Zend_Form_Element
Throws
Exception Description
\Zend_Form_Exception if invalid validator type
methodpublicfilterName(string $value, bool $allowBrackets = false) : string
Parameters
Name Type Description
$value string
$allowBrackets bool
Returns
Type Description
string
methodpublicgetAmPm() : bool
inherited

Retrieve am,pm flag

Inherited from: \Zend_Dojo_Form_Element_DateTextBox::getAmPm()
Returns
Type Description
bool
methodpublicgetAttrib(string $name) : string
Parameters
Name Type Description
$name string
Returns
Type Description
string
methodpublicgetClickableIncrement() : string | null

Retrieve clickableIncrement

Returns
Type Description
string | null
methodpublicgetConstraint(string $key) : mixed
Parameters
Name Type Description
$key string
Returns
Type Description
mixed
methodpublicgetConstraints() : array
Returns
Type Description
array
methodpublicgetDatePattern() : string | null
inherited

Retrieve date format pattern

Inherited from: \Zend_Dojo_Form_Element_DateTextBox::getDatePattern()
Returns
Type Description
string | null
methodpublicgetDijitParam(string $key) : mixed
Parameters
Name Type Description
$key string
Returns
Type Description
mixed
methodpublicgetFormatLength() : string | null
inherited

Retrieve formatLength

Inherited from: \Zend_Dojo_Form_Element_DateTextBox::getFormatLength()
Returns
Type Description
string | null
methodpublicgetInvalidMessage() : string | null
Returns
Type Description
string | null
methodpublicgetLocale() : string | null
inherited

Retrieve locale

Inherited from: \Zend_Dojo_Form_Element_DateTextBox::getLocale()
Returns
Type Description
string | null
methodpublicgetMaxLength() : int | null
Returns
Type Description
int | null
methodpublicgetMessages() : array

The array keys are validation failure message identifiers, and the array values are the corresponding human-readable message strings.

If isValid() was never called or if the most recent isValid() call returned true, then this method returns an empty array.

Returns
Type Description
array
methodpublicgetPluginLoader(string $type) : \Zend_Loader_PluginLoader

Instantiates with default rules if none available for that type. Use 'decorator', 'filter', or 'validate' for $type.

Parameters
Name Type Description
$type string
Returns
Type Description
\Zend_Loader_PluginLoader
Throws
Exception Description
\Zend_Loader_Exception on invalid type.
methodpublicgetPromptMessage() : string | null
Returns
Type Description
string | null
methodpublicgetRegExp() : string | null
Returns
Type Description
string | null
methodpublicgetSelector() : string | null
inherited

Retrieve selector

Inherited from: \Zend_Dojo_Form_Element_DateTextBox::getSelector()
Returns
Type Description
string | null
methodpublicgetStrict() : bool
inherited

Retrieve strict flag

Inherited from: \Zend_Dojo_Form_Element_DateTextBox::getStrict()
Returns
Type Description
bool
methodpublicgetTimePattern() : string | null

Retrieve time format pattern

Returns
Type Description
string | null
methodpublicgetValidator(string $name) : \Zend_Validate_Interface | false
Parameters
Name Type Description
$name string
Returns
Type Description
\Zend_Validate_Interface | false False if not found, validator otherwise
methodpublicgetVisibleIncrement() : string | null

Retrieve visibleIncrement

Returns
Type Description
string | null
methodpublicgetVisibleRange() : string | null

Retrieve visibleRange

Returns
Type Description
string | null
methodpublichasConstraint(string $key) : bool
Parameters
Name Type Description
$key string
Returns
Type Description
bool
methodpublichasDijitParam(string $key) : bool
Parameters
Name Type Description
$key string
Returns
Type Description
bool
methodpublicisValid(mixed $value, mixed $context = null) : boolean

If a translation adapter is registered, any error messages will be translated according to the current locale, using the given error code; if no matching translation is found, the original message will be utilized.

Note: The filtered value is validated.

Parameters
Name Type Description
$value mixed
$context mixed
Returns
Type Description
boolean
Throws
Exception Description
\Zend_Validate_Exception If validation of $value is impossible
methodpublicremoveConstraint(string $key) : \Zend_Dojo_Form_Element_ValidationTextBox
Parameters
Name Type Description
$key string
Returns
Type Description
\Zend_Dojo_Form_Element_ValidationTextBox
methodpublicremoveValidator(string $name) : bool
Parameters
Name Type Description
$name string
Returns
Type Description
bool
methodpublicresolveElementId(\Zend_Form_Decorator_Interface $decorator) : string

Passed to the HtmlTag decorator as a callback in order to provide an ID.

Parameters
Name Type Description
$decorator \Zend_Form_Decorator_Interface
Returns
Type Description
string
methodpublicsetAllowEmpty(bool $flag) : \Zend_Form_Element

When the allow empty flag is enabled and the required flag is false, the element will validate with empty values.

Parameters
Name Type Description
$flag bool
Returns
Type Description
\Zend_Form_Element
methodpublicsetAmPm( $flag) : \Zend_Dojo_Form_Element_DateTextBox
inherited

Set am,pm flag

Inherited from: \Zend_Dojo_Form_Element_DateTextBox::setAmPm()
Parameters
Name Type Description
$flag
Returns
Type Description
\Zend_Dojo_Form_Element_DateTextBox
methodpublicsetAttrib(string $name, mixed $value) : \Zend_Form_Element
Parameters
Name Type Description
$name string
$value mixed
Returns
Type Description
\Zend_Form_Element
Throws
Exception Description
\Zend_Form_Exception for invalid $name values
methodpublicsetClickableIncrement(string $format) : \Zend_Dojo_Form_Element_NumberTextBox

Set clickableIncrement

Parameters
Name Type Description
$format string
Returns
Type Description
\Zend_Dojo_Form_Element_NumberTextBox
methodpublicsetConstraint(string $key, mixed $value) : \Zend_Dojo_Form_Element_ValidationTextBox
Parameters
Name Type Description
$key string
$value mixed
Returns
Type Description
\Zend_Dojo_Form_Element_ValidationTextBox
methodpublicsetConstraints(array $constraints) : \Zend_Dojo_Form_Element_ValidationTextBox

Refer to Dojo dijit.form.ValidationTextBox documentation for valid structure.

Parameters
Name Type Description
$constraints array
Returns
Type Description
\Zend_Dojo_Form_Element_ValidationTextBox
methodpublicsetDatePattern(string $pattern) : \Zend_Dojo_Form_Element_NumberTextBox
inherited

Set date format pattern

Inherited from: \Zend_Dojo_Form_Element_DateTextBox::setDatePattern()
Parameters
Name Type Description
$pattern string
Returns
Type Description
\Zend_Dojo_Form_Element_NumberTextBox
methodpublicsetDijitParam(string $key, mixed $value) : \Zend_Dojo_Form_Element_Dijit
Parameters
Name Type Description
$key string
$value mixed
Returns
Type Description
\Zend_Dojo_Form_Element_Dijit
methodpublicsetErrorMessages(array $messages) : \Zend_Form_Element
Parameters
Name Type Description
$messages array
Returns
Type Description
\Zend_Form_Element
methodpublicsetErrors(array $messages) : \Zend_Form_Element
Parameters
Name Type Description
$messages array
Returns
Type Description
\Zend_Form_Element
methodpublicsetFilters(array $filters) : \Zend_Form_Element
Parameters
Name Type Description
$filters array
Returns
Type Description
\Zend_Form_Element
methodpublicsetFormatLength(string $formatLength) : \Zend_Dojo_Form_Element_NumberTextBox
inherited

Set numeric format formatLength

Inherited from: \Zend_Dojo_Form_Element_DateTextBox::setFormatLength()
Parameters
Name Type Description
$formatLength string
Returns
Type Description
\Zend_Dojo_Form_Element_NumberTextBox
Details
See
\global\$_allowedFormatTypes  
methodpublicsetIgnore(bool $flag) : \Zend_Form_Element
Parameters
Name Type Description
$flag bool
Returns
Type Description
\Zend_Form_Element
methodpublicsetInvalidMessage(string $message) : \Zend_Dojo_Form_Element_ValidationTextBox
Parameters
Name Type Description
$message string
Returns
Type Description
\Zend_Dojo_Form_Element_ValidationTextBox
methodpublicsetIsArray(bool $flag) : \Zend_Form_Element
Parameters
Name Type Description
$flag bool
Returns
Type Description
\Zend_Form_Element
methodpublicsetLocale(string $locale) : \Zend_Dojo_Form_Element_DateTextBox
inherited

Set locale

Inherited from: \Zend_Dojo_Form_Element_DateTextBox::setLocale()
Parameters
Name Type Description
$locale string
Returns
Type Description
\Zend_Dojo_Form_Element_DateTextBox
methodpublicsetPluginLoader(\Zend_Loader_PluginLoader_Interface $loader, string $type) : \Zend_Form_Element
Parameters
Name Type Description
$loader \Zend_Loader_PluginLoader_Interface
$type string

'decorator', 'filter', or 'validate'

Returns
Type Description
\Zend_Form_Element
Throws
Exception Description
\Zend_Form_Exception on invalid type
methodpublicsetPromptMessage(string $message) : \Zend_Dojo_Form_Element_ValidationTextBox
Parameters
Name Type Description
$message string
Returns
Type Description
\Zend_Dojo_Form_Element_ValidationTextBox
methodpublicsetRegExp(string $regexp) : \Zend_Dojo_Form_Element_ValidationTextBox
Parameters
Name Type Description
$regexp string
Returns
Type Description
\Zend_Dojo_Form_Element_ValidationTextBox
methodpublicsetSelector(string $selector) : \Zend_Dojo_Form_Element_NumberTextBox
inherited

Set numeric format Selector

Inherited from: \Zend_Dojo_Form_Element_DateTextBox::setSelector()
Parameters
Name Type Description
$selector string
Returns
Type Description
\Zend_Dojo_Form_Element_NumberTextBox
Details
See
\global\$_allowedSelectorTypes  
methodpublicsetStrict( $flag) : \Zend_Dojo_Form_Element_DateTextBox
inherited

Set strict flag

Inherited from: \Zend_Dojo_Form_Element_DateTextBox::setStrict()
Parameters
Name Type Description
$flag
Returns
Type Description
\Zend_Dojo_Form_Element_DateTextBox
methodpublicsetTimePattern(string $pattern) : \Zend_Dojo_Form_Element_NumberTextBox

Set time format pattern

Parameters
Name Type Description
$pattern string
Returns
Type Description
\Zend_Dojo_Form_Element_NumberTextBox
methodpublicsetValidators(array $validators) : \Zend_Form_Element
Parameters
Name Type Description
$validators array
Returns
Type Description
\Zend_Form_Element
methodpublicsetView(\Zend_View_Interface $view = null) : \Zend_Dojo_Form_Element_Dijit

Ensures that the view object has the dojo view helper path set.

Parameters
Name Type Description
$view \Zend_View_Interface
Returns
Type Description
\Zend_Dojo_Form_Element_Dijit
methodpublicsetVisibleIncrement(string $format) : \Zend_Dojo_Form_Element_NumberTextBox

Set visibleIncrement

Parameters
Name Type Description
$format string
Returns
Type Description
\Zend_Dojo_Form_Element_NumberTextBox
methodpublicsetVisibleRange(string $format) : \Zend_Dojo_Form_Element_NumberTextBox

Set visibleRange

Parameters
Name Type Description
$format string
Returns
Type Description
\Zend_Dojo_Form_Element_NumberTextBox
Documentation was generated by phpDocumentor 2.0.0a8.