Dojo/Form/Element/FilteringSelect.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_FilteringSelect

Package: Zend\Dojo\Form\Element

FilteringSelect dijit

Note: this would be easier with mixins or traits...

Parent(s)
\Zend_Dojo_Form_Element_ComboBox < \Zend_Dojo_Form_Element_DijitMulti < \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_ComboBox  
Version
$Id: FilteringSelect.php 24593 2012-01-05 20:35:02Z matthew $  

Constants

Properties

Propertyprotectedbool $_ignore = false
Default valuefalseDetails
Type
bool
Inherited_from
\Zend_Form_Element::$$_ignore  
Inherited_from
\Zend_Dojo_Form_Element_Dijit::$$_ignore  
Inherited_from
\Zend_Dojo_Form_Element_DijitMulti::$$_ignore  
Inherited_from
\Zend_Dojo_Form_Element_ComboBox::$$_ignore  
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_DijitMulti::$$_isPartialRendering  
Inherited_from
\Zend_Dojo_Form_Element_ComboBox::$$_isPartialRendering  
Propertyprotectedarray $_loaders = array()
Default valuearray()Details
Type
array
Inherited_from
\Zend_Form_Element::$$_loaders  
Inherited_from
\Zend_Dojo_Form_Element_Dijit::$$_loaders  
Inherited_from
\Zend_Dojo_Form_Element_DijitMulti::$$_loaders  
Inherited_from
\Zend_Dojo_Form_Element_ComboBox::$$_loaders  
Propertyprotectedbool $_registerInArrayValidator = true

Flag: autoregister inArray validator?

Default valuetrueDetails
Type
bool
Propertyprotectedstring $_separator = '<br />'
inherited

Separator to use between options; defaults to '<br />'.

Inherited from: \Zend_Dojo_Form_Element_DijitMulti::$$_separator\Zend_Dojo_Form_Element_ComboBox::$$_separator
Default value'<br />'Details
Type
string
Inherited_from
\Zend_Dojo_Form_Element_DijitMulti::$$_separator  
Inherited_from
\Zend_Dojo_Form_Element_ComboBox::$$_separator  
Propertyprotectedarray $_translated = array()
Default valuearray()Details
Type
array
Inherited_from
\Zend_Dojo_Form_Element_DijitMulti::$$_translated  
Inherited_from
\Zend_Dojo_Form_Element_ComboBox::$$_translated  
Propertypublicstring $helper = 'FilteringSelect'

Use FilteringSelect dijit view helper

Default value'FilteringSelect'Details
Type
string
Propertypublicarray $options = array()
Default valuearray()Details
Type
array
Inherited_from
\Zend_Dojo_Form_Element_DijitMulti::$$options  
Inherited_from
\Zend_Dojo_Form_Element_ComboBox::$$options  

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
methodpublic__toString() : string

Proxies to render().

Returns
Type Description
string
methodprotected_filterValue(string $value, string $key) : void
Parameters
Name Type Description
$value string
$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_getErrorMessages() : array
Returns
Type Description
array
methodprotected_getMultiOptions() : array
Returns
Type Description
array
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_loadFilter(array $filter) : \Zend_Filter_Interface
Parameters
Name Type Description
$filter array
Returns
Type Description
\Zend_Filter_Interface
methodprotected_loadValidator(array $validator) : \Zend_Validate_Interface
Parameters
Name Type Description
$validator array

Validator definition

Returns
Type Description
\Zend_Validate_Interface
methodprotected_translateOption(string $option, string $value) : bool
Parameters
Name Type Description
$option string
$value string
Returns
Type Description
bool
methodprotected_translateValue(array | string $value) : array | string
Parameters
Name Type Description
$value array | string
Returns
Type Description
array | string
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
methodpublicaddDecorators(array $decorators) : \Zend_Form_Element
Parameters
Name Type Description
$decorators array
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
methodpublicaddFilter(string | \Zend_Filter_Interface $filter,  $options = array()) : \Zend_Form_Element
Parameters
Name Type Description
$filter string | \Zend_Filter_Interface
$options
Returns
Type Description
\Zend_Form_Element
methodpublicaddFilters(array $filters) : \Zend_Form_Element
Parameters
Name Type Description
$filters array
Returns
Type Description
\Zend_Form_Element
methodpublicaddMultiOption(string $option, string $value = '') : \Zend_Form_Element_Multi
Parameters
Name Type Description
$option string
$value string
Returns
Type Description
\Zend_Form_Element_Multi
methodpublicaddMultiOptions(array $options) : \Zend_Form_Element_Multi
Parameters
Name Type Description
$options array
Returns
Type Description
\Zend_Form_Element_Multi
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
methodpublicaddPrefixPaths(array $spec) : \Zend_Form_Element
Parameters
Name Type Description
$spec array
Returns
Type Description
\Zend_Form_Element
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
methodpublicaddValidators(array $validators) : \Zend_Form_Element
Parameters
Name Type Description
$validators array
Returns
Type Description
\Zend_Form_Element
methodpublicautoInsertNotEmptyValidator() : bool
Returns
Type Description
bool
methodpublicfilterName(string $value, bool $allowBrackets = false) : string
Parameters
Name Type Description
$value string
$allowBrackets bool
Returns
Type Description
string
methodpublicgetAttrib(string $name) : string
Parameters
Name Type Description
$name string
Returns
Type Description
string
methodpublicgetAutocomplete() : bool
inherited

Get autocomplete flag

Inherited from: \Zend_Dojo_Form_Element_ComboBox::getAutocomplete()
Returns
Type Description
bool
methodpublicgetBelongsTo() : string
Returns
Type Description
string
methodpublicgetDecorator(string $name) : false | \Zend_Form_Decorator_Abstract
Parameters
Name Type Description
$name string
Returns
Type Description
false | \Zend_Form_Decorator_Abstract
methodpublicgetDijitParam(string $key) : mixed
Parameters
Name Type Description
$key string
Returns
Type Description
mixed
methodpublicgetDijitParams() : array
Returns
Type Description
array
methodpublicgetErrors() : array
Returns
Type Description
array
methodpublicgetFilter(string $name) : \Zend_Filter_Interface
Parameters
Name Type Description
$name string
Returns
Type Description
\Zend_Filter_Interface
methodpublicgetFullyQualifiedName() : string

Places name as subitem of array and/or appends brackets.

Returns
Type Description
string
methodpublicgetIgnore() : bool
Returns
Type Description
bool
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
methodpublicgetMultiOption(string $option) : mixed
Parameters
Name Type Description
$option string
Returns
Type Description
mixed
methodpublicgetMultiOptions() : 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.
methodpublicgetSeparator() : mixed
Returns
Type Description
mixed
methodpublicgetStoreId() : string | null
inherited

Get datastore identifier

Inherited from: \Zend_Dojo_Form_Element_ComboBox::getStoreId()
Returns
Type Description
string | null
methodpublicgetStoreInfo() : array
inherited

Get datastore information

Inherited from: \Zend_Dojo_Form_Element_ComboBox::getStoreInfo()
Returns
Type Description
array
methodpublicgetStoreParams() : array
inherited

Get datastore params

Inherited from: \Zend_Dojo_Form_Element_ComboBox::getStoreParams()
Returns
Type Description
array
methodpublicgetStoreType() : string | null
inherited

Get datastore dijit type

Inherited from: \Zend_Dojo_Form_Element_ComboBox::getStoreType()
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
methodpublicgetValue() : mixed
Returns
Type Description
mixed
methodpublicgetView() : null | \Zend_View_Interface

Retrieves from ViewRenderer if none previously set.

Returns
Type Description
null | \Zend_View_Interface
methodpublichasDijitParam(string $key) : bool
Parameters
Name Type Description
$key string
Returns
Type Description
bool
methodpublichasTranslator() : bool
Returns
Type Description
bool
methodpublicisArray() : bool
Returns
Type Description
bool
methodpublicisValid(string $value, mixed $context = null) : bool
inherited

Is the value valid?

Inherited from: \Zend_Dojo_Form_Element_ComboBox::isValid()

Autoregisters InArray validator if necessary.

Parameters
Name Type Description
$value string
$context mixed
Returns
Type Description
bool
Throws
Exception Description
\Zend_Validate_Exception If validation of $value is impossible
methodpublicregisterInArrayValidator() : bool
Returns
Type Description
bool
methodpublicremoveDecorator(string $name) : \Zend_Form_Element
Parameters
Name Type Description
$name string
Returns
Type Description
\Zend_Form_Element
methodpublicremoveDijitParam(string $key) : \Zend_Dojo_Form_Element_Dijit
Parameters
Name Type Description
$key string
Returns
Type Description
\Zend_Dojo_Form_Element_Dijit
methodpublicremoveFilter(string $name) : \Zend_Form_Element
Parameters
Name Type Description
$name string
Returns
Type Description
\Zend_Form_Element
methodpublicremoveMultiOption(string $option) : bool
Parameters
Name Type Description
$option string
Returns
Type Description
bool
methodpublicremoveValidator(string $name) : bool
Parameters
Name Type Description
$name string
Returns
Type Description
bool
methodpublicrender(\Zend_View_Interface $view = null) : string
Parameters
Name Type Description
$view \Zend_View_Interface
Returns
Type Description
string
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
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
methodpublicsetAttribs(array $attribs) : \Zend_Form_Element
Parameters
Name Type Description
$attribs array
Returns
Type Description
\Zend_Form_Element
methodpublicsetAutoInsertNotEmptyValidator(bool $flag) : \Zend_Form_Element
Parameters
Name Type Description
$flag bool
Returns
Type Description
\Zend_Form_Element
methodpublicsetAutocomplete(bool $flag) : \Zend_Dojo_Form_Element_ComboBox
inherited

Set autocomplete flag

Inherited from: \Zend_Dojo_Form_Element_ComboBox::setAutocomplete()
Parameters
Name Type Description
$flag bool
Returns
Type Description
\Zend_Dojo_Form_Element_ComboBox
methodpublicsetBelongsTo(string $array) : \Zend_Form_Element
Parameters
Name Type Description
$array string
Returns
Type Description
\Zend_Form_Element
methodpublicsetConfig(\Zend_Config $config) : \Zend_Form_Element
Parameters
Name Type Description
$config \Zend_Config
Returns
Type Description
\Zend_Form_Element
methodpublicsetDecorators(array $decorators) : \Zend_Form_Element
Parameters
Name Type Description
$decorators array
Returns
Type Description
\Zend_Form_Element
methodpublicsetDescription(string $description) : \Zend_Form_Element
Parameters
Name Type Description
$description string
Returns
Type Description
\Zend_Form_Element
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
methodpublicsetDijitParams(array $params) : \Zend_Dojo_Form_Element_Dijit
Parameters
Name Type Description
$params array
Returns
Type Description
\Zend_Dojo_Form_Element_Dijit
methodpublicsetDisableTranslator(bool $flag) : \Zend_Form_Element
Parameters
Name Type Description
$flag bool
Returns
Type Description
\Zend_Form_Element
methodpublicsetErrorMessageSeparator(string $separator) : \Zend_Form_Element
Parameters
Name Type Description
$separator string
Returns
Type Description
\Zend_Form_Element
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
methodpublicsetIgnore(bool $flag) : \Zend_Form_Element
Parameters
Name Type Description
$flag bool
Returns
Type Description
\Zend_Form_Element
methodpublicsetIsArray(bool $flag) : \Zend_Form_Element
Parameters
Name Type Description
$flag bool
Returns
Type Description
\Zend_Form_Element
methodpublicsetLabel(string $label) : \Zend_Form_Element
Parameters
Name Type Description
$label string
Returns
Type Description
\Zend_Form_Element
methodpublicsetMultiOptions(array $options) : \Zend_Form_Element_Multi
Parameters
Name Type Description
$options array
Returns
Type Description
\Zend_Form_Element_Multi
methodpublicsetName(string $name) : \Zend_Form_Element
Parameters
Name Type Description
$name string
Returns
Type Description
\Zend_Form_Element
methodpublicsetOptions(array $options) : \Zend_Form_Element
Parameters
Name Type Description
$options array
Returns
Type Description
\Zend_Form_Element
methodpublicsetOrder(int $order) : \Zend_Form_Element
Parameters
Name Type Description
$order int
Returns
Type Description
\Zend_Form_Element
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
methodpublicsetRegisterInArrayValidator(bool $flag) : \Zend_Form_Element_Multi
inherited

Set flag indicating whether or not to auto-register inArray validator

Inherited from: \Zend_Dojo_Form_Element_DijitMulti::setRegisterInArrayValidator()\Zend_Dojo_Form_Element_ComboBox::setRegisterInArrayValidator()
Parameters
Name Type Description
$flag bool
Returns
Type Description
\Zend_Form_Element_Multi
methodpublicsetRequired(bool $flag = true) : \Zend_Form_Element
Parameters
Name Type Description
$flag bool

Default value is true

Returns
Type Description
\Zend_Form_Element
methodpublicsetSeparator(mixed $separator) : \Zend_Dojo_Form_Element_FilteringSelect
Parameters
Name Type Description
$separator mixed
Returns
Type Description
\Zend_Dojo_Form_Element_FilteringSelect
Details
Fluent
This method is part of a fluent interface and will return the same instance  
methodpublicsetStoreId(string $identifier) : \Zend_Dojo_Form_Element_ComboBox
inherited

Set datastore identifier

Inherited from: \Zend_Dojo_Form_Element_ComboBox::setStoreId()
Parameters
Name Type Description
$identifier string
Returns
Type Description
\Zend_Dojo_Form_Element_ComboBox
methodpublicsetStoreParams(array $params) : \Zend_Dojo_Form_Element_ComboBox
inherited

Set datastore parameters

Inherited from: \Zend_Dojo_Form_Element_ComboBox::setStoreParams()
Parameters
Name Type Description
$params array
Returns
Type Description
\Zend_Dojo_Form_Element_ComboBox
methodpublicsetStoreType(string $dojoType) : \Zend_Dojo_Form_Element_ComboBox
inherited

Set datastore dijit type

Inherited from: \Zend_Dojo_Form_Element_ComboBox::setStoreType()
Parameters
Name Type Description
$dojoType string
Returns
Type Description
\Zend_Dojo_Form_Element_ComboBox
methodpublicsetTranslator(\Zend_Translate | null $translator = null) : \Zend_Form_Element
Parameters
Name Type Description
$translator \Zend_Translate | null
Returns
Type Description
\Zend_Form_Element
methodpublicsetValidators(array $validators) : \Zend_Form_Element
Parameters
Name Type Description
$validators array
Returns
Type Description
\Zend_Form_Element
methodpublicsetValue(mixed $value) : \Zend_Form_Element
Parameters
Name Type Description
$value mixed
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
Documentation was generated by phpDocumentor 2.0.0a8.