Packages

  • 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

Classes

  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Other releases
  • Nette homepage

Class NSelectBox

Select box control that allows single item selection.

NObject
Extended by NComponent implements IComponent
Extended by NFormControl implements IFormControl
Extended by NSelectBox

Direct known subclasses

NMultiSelectBox
Package: 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

NFormControl::__construct()
public mixed
# getValue( )

Returns selected item key.

Returns selected item key.

Returns

mixed

Overrides

NFormControl::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

NFormControl::isFilled()
public NSelectBox
# setPrompt( string $prompt )

Sets first prompt item in select box.

Sets first prompt item in select box.

Parameters

$prompt
string

Returns

NSelectBox
public
# skipFirst( $v = NULL )

Deprecated

public mixed
# getPrompt( )

Returns first prompt item?

Returns first prompt item?

Returns

mixed
public boolean
# areKeysUsed( )

Are the keys used?

Are the keys used?

Returns

boolean
public NSelectBox
# setItems( array $items, boolean $useKeys = TRUE )

Sets items from which to choose.

Sets items from which to choose.

Parameters

$items
array
$useKeys
boolean

Returns

NSelectBox
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 NHtml
# getControl( )

Generates control's HTML element.

Generates control's HTML element.

Returns

NHtml

Overrides

NFormControl::getControl()
Methods inherited from NFormControl
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()
Methods inherited from NComponent
__clone(), __sleep(), __wakeup(), detached(), getName(), getParent(), lookup(), lookupPath(), monitor(), unmonitor(), validateParent()
Methods inherited from NObject
__call(), __callStatic(), __get(), __isset(), __set(), __unset(), extensionMethod(), getReflection()
Methods inherited from IComponent
setParent()
Constants inherited from IComponent
NAME_SEPARATOR
Properties summary
protected array $allowed array()
#
Properties inherited from NFormControl
$caption, $control, $idMask, $label, $value
Magic properties summary
public boolean $prompt
#
public array $items
#
public read-only mixed $rawValue
#
public read-only string $selectedItem
#
Magic properties inherited from NFormControl
$control, $controlPrototype, $defaultValue, $disabled, $errors, $filled, $form, $htmlId, $htmlName, $label, $labelPrototype, $options, $required, $rules, $translator, $value
Magic properties inherited from NComponent
$name, $parent
Magic properties inherited from NObject
$reflection
Nette Framework 2.0.18 (for PHP 5.2, prefixed) API documentation generated by ApiGen 2.8.0