Namespaces

  • Nette
    • Application
      • Diagnostics
      • Responses
      • Routers
      • UI
    • Caching
      • Storages
    • ComponentModel
    • Config
      • Adapters
      • Extensions
    • Database
      • Diagnostics
      • Drivers
      • Reflection
      • Table
    • DI
      • Diagnostics
    • Diagnostics
    • Forms
      • Controls
      • Rendering
    • Http
    • Iterators
    • Latte
      • Macros
    • Loaders
    • Localization
    • Mail
    • Reflection
    • Security
      • Diagnostics
    • Templating
    • Utils
      • PhpGenerator
  • NetteModule
  • None
  • PHP

Classes

  • BaseControl
  • Button
  • Checkbox
  • HiddenField
  • ImageButton
  • MultiSelectBox
  • RadioList
  • SelectBox
  • SubmitButton
  • TextArea
  • TextBase
  • TextInput
  • UploadControl
  • Overview
  • Namespace
  • Class
  • Tree

Class SelectBox

Select box control that allows single item selection.

Nette\Object
Extended by Nette\ComponentModel\Component implements Nette\ComponentModel\IComponent
Extended by Nette\Forms\Controls\BaseControl implements Nette\Forms\IControl
Extended by Nette\Forms\Controls\SelectBox

Direct known subclasses

Nette\Forms\Controls\MultiSelectBox
Namespace: Nette\Forms\Controls
Author: David Grudl
Located at Forms/Controls/SelectBox.php
Methods summary
public
# __construct( string $label = NULL, array $items = NULL, integer $size = NULL )

Parameters

$label
string
label
$items
array
items from which to choose
$size
integer
number of rows that should be visible

Overrides

Nette\Forms\Controls\BaseControl::__construct
public mixed
# getValue( )

Returns selected item key.

Returns selected item key.

Returns

mixed

Overrides

Nette\Forms\Controls\BaseControl::getValue

Implementation of

Nette\Forms\IControl::getValue
public mixed
# getRawValue( )

Returns selected item key (not checked).

Returns selected item key (not checked).

Returns

mixed
public boolean
# isFilled( )

Has been any item selected?

Has been any item selected?

Returns

boolean

Overrides

Nette\Forms\Controls\BaseControl::isFilled
public Nette\Forms\Controls\SelectBox
# setPrompt( string $prompt )

Ignores the first item in select box.

Ignores the first item in select box.

Parameters

$prompt
string

Returns

Nette\Forms\Controls\SelectBox
provides a fluent interface
final public boolean
# getPrompt( )

Is first item in select box ignored?

Is first item in select box ignored?

Returns

boolean
final public boolean
# areKeysUsed( )

Are the keys used?

Are the keys used?

Returns

boolean
public Nette\Forms\Controls\SelectBox
# setItems( array $items, boolean $useKeys = TRUE )

Sets items from which to choose.

Sets items from which to choose.

Parameters

$items
array
$useKeys
boolean

Returns

Nette\Forms\Controls\SelectBox
provides a fluent interface
final public array
# getItems( )

Returns items from which to choose.

Returns items from which to choose.

Returns

array
public string
# getSelectedItem( )

Returns selected value.

Returns selected value.

Returns

string
public Nette\Utils\Html
# getControl( )

Generates control's HTML element.

Generates control's HTML element.

Returns

Nette\Utils\Html

Overrides

Nette\Forms\Controls\BaseControl::getControl
Methods inherited from Nette\Forms\Controls\BaseControl
addCondition(), addConditionOn(), addError(), addRule(), attached(), cleanErrors(), exportRules(), getControlPrototype(), getErrors(), getForm(), getHtmlId(), getHtmlName(), getLabel(), getLabelPrototype(), getOption(), getOptions(), getRules(), getTranslator(), hasErrors(), isDisabled(), isRequired(), loadHttpData(), setAttribute(), setDefaultValue(), setDisabled(), setHtmlId(), setOption(), setRequired(), setTranslator(), setValue(), translate(), validateEqual(), validateFilled(), validateValid()
Methods inherited from Nette\ComponentModel\Component
__clone(), __sleep(), __wakeup(), detached(), getName(), getParent(), lookup(), lookupPath(), monitor(), unmonitor(), validateParent()
Methods inherited from Nette\Object
__call(), __callStatic(), __get(), __isset(), __set(), __unset(), extensionMethod(), getReflection()
Methods inherited from Nette\ComponentModel\IComponent
setParent()
Constants inherited from Nette\ComponentModel\IComponent
NAME_SEPARATOR
Properties summary
protected array $allowed array()
#
Properties inherited from Nette\Forms\Controls\BaseControl
$caption, $control, $idMask, $label, $value
Nette Framework 2.0.4 API API documentation generated by ApiGen 2.7.0