Packages

  • Nette
    • Application
    • Caching
    • Collections
    • Config
    • Forms
    • IO
    • Loaders
    • Mail
    • Reflection
    • Security
    • Templates
    • Web
  • None
  • PHP

Classes

  • NButton
  • NCheckbox
  • NConventionalRenderer
  • NFileUpload
  • NForm
  • NFormContainer
  • NFormGroup
  • NHiddenField
  • NImageButton
  • NInstantClientScript
  • NMultiSelectBox
  • NRadioList
  • NRule
  • NRules
  • NSelectBox
  • NSubmitButton
  • NTextArea
  • NTextBase
  • NTextInput

Interfaces

  • IFormControl
  • IFormRenderer
  • INamingContainer
  • ISubmitterControl
  • Overview
  • Package
  • Class
  • Tree
  • Other releases

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
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
public mixed
# getValue( )

Returns selected item key.

Returns selected item key.

Returns

mixed

Implementation of

IFormControl::getValue
public mixed
# getRawValue( )

Returns selected item key (not checked).

Returns selected item key (not checked).

Returns

mixed
public NSelectBox
# skipFirst( string $item = NULL )

Ignores the first item in select box.

Ignores the first item in select box.

Parameters

$item
string

Returns

NSelectBox
provides a fluent interface
final public boolean
# isFirstSkipped( )

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 NSelectBox
# setItems( array $items, $useKeys = TRUE )

Sets items from which to choose.

Sets items from which to choose.

Parameters

$items
array
$useKeys

Returns

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

Generates control's HTML element.

Generates control's HTML element.

Returns

NHtml
public static boolean
# validateFilled( IFormControl $control )

Filled validator: has been any item selected?

Filled validator: has been any item selected?

Parameters

$control
IFormControl

Returns

boolean
Methods inherited from NFormControl
addCondition(), addConditionOn(), addError(), addRule(), attached(), cleanErrors(), getControlPrototype(), getErrors(), getForm(), getHtmlId(), getHtmlName(), getLabel(), getLabelPrototype(), getOption(), getOptions(), getRules(), getTranslator(), hasErrors(), isDisabled(), loadHttpData(), notifyRule(), setDefaultValue(), setDisabled(), setHtmlId(), setOption(), setTranslator(), setValue(), translate(), validateEqual(), validateValid()
Methods inherited from NComponent
__clone(), __wakeup(), detached(), getName(), getParent(), lookup(), lookupPath(), monitor(), setParent(), unmonitor(), validateParent()
Methods inherited from NObject
__call(), __callStatic(), __get(), __isset(), __set(), __unset(), extensionMethod(), getReflection()
Constants inherited from IComponent
NAME_SEPARATOR
Properties summary
protected array $allowed array()
#
Properties inherited from NFormControl
$caption, $control, $idMask, $label, $value
Nette Framework 0.9.7 (for PHP 5.2) API documentation generated by ApiGen 2.3.0