Namespaces

  • Latte
    • Loaders
    • Macros
    • Runtime
  • Nette
    • Application
      • Responses
      • Routers
      • UI
    • Bridges
      • ApplicationDI
      • ApplicationLatte
      • ApplicationTracy
      • CacheDI
      • CacheLatte
      • DatabaseDI
      • DatabaseTracy
      • DITracy
      • FormsDI
      • FormsLatte
      • Framework
      • HttpDI
      • HttpTracy
      • MailDI
      • ReflectionDI
      • SecurityDI
      • SecurityTracy
    • Caching
      • Storages
    • ComponentModel
    • Database
      • Conventions
      • Drivers
      • Reflection
      • Table
    • DI
      • Config
        • Adapters
      • Extensions
    • Diagnostics
    • Forms
      • Controls
      • Rendering
    • Http
    • Iterators
    • Latte
    • Loaders
    • Localization
    • Mail
    • Neon
    • PhpGenerator
    • Reflection
    • Security
    • Templating
    • Utils
  • NetteModule
  • none
  • Tracy
    • Bridges
      • Nette

Classes

  • BaseControl
  • Button
  • Checkbox
  • CheckboxList
  • ChoiceControl
  • CsrfProtection
  • HiddenField
  • ImageButton
  • MultiChoiceControl
  • MultiSelectBox
  • RadioList
  • SelectBox
  • SubmitButton
  • TextArea
  • TextBase
  • TextInput
  • UploadControl
  • Overview
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Other releases
  • Nette homepage

Class ChoiceControl

Choice 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\ChoiceControl

Direct known subclasses

Nette\Forms\Controls\RadioList, Nette\Forms\Controls\SelectBox
Abstract
Namespace: Nette\Forms\Controls
Located at Forms/Controls/ChoiceControl.php
Methods summary
public
# __construct( string $label = NULL, array $items = NULL )

Parameters

$label
caption
$items

Overrides

Nette\Forms\Controls\BaseControl::__construct()
public
# loadHttpData( )

Loads HTTP data.

Loads HTTP data.

Overrides

Nette\Forms\Controls\BaseControl::loadHttpData()
public Nette\Forms\Controls\ChoiceControl
# setValue( scalar $value )

Sets selected item (by key).

Sets selected item (by key).

Parameters

$value

Returns

Nette\Forms\Controls\ChoiceControl
self

Overrides

Nette\Forms\Controls\BaseControl::setValue()
public scalar
# getValue( )

Returns selected key.

Returns selected key.

Returns

scalar
scalar

Overrides

Nette\Forms\Controls\BaseControl::getValue()
public scalar
# getRawValue( )

Returns selected key (not checked).

Returns selected key (not checked).

Returns

scalar
scalar
public boolean
# isFilled( )

Is any item selected?

Is any item selected?

Returns

boolean
bool

Overrides

Nette\Forms\Controls\BaseControl::isFilled()
public Nette\Forms\Controls\ChoiceControl
# setItems( array $items, boolean $useKeys = TRUE )

Sets items from which to choose.

Sets items from which to choose.

Parameters

$items
$useKeys

Returns

Nette\Forms\Controls\ChoiceControl
self
public array
# getItems( )

Returns items from which to choose.

Returns items from which to choose.

Returns

array
array
public mixed
# getSelectedItem( )

Returns selected value.

Returns selected value.

Returns

mixed
mixed
public Nette\Forms\Controls\ChoiceControl
# setDisabled( boolean|array $value = TRUE )

Disables or enables control or items.

Disables or enables control or items.

Parameters

$value

Returns

Nette\Forms\Controls\ChoiceControl
self

Overrides

Nette\Forms\Controls\BaseControl::setDisabled()
Methods inherited from Nette\Forms\Controls\BaseControl
addCondition(), addConditionOn(), addError(), addRule(), attached(), cleanErrors(), exportRules(), getControl(), getControlPrototype(), getError(), getErrors(), getForm(), getHtmlId(), getHtmlName(), getHttpData(), getLabel(), getLabelPrototype(), getOption(), getOptions(), getRules(), getTranslator(), hasErrors(), isDisabled(), isOmitted(), isRequired(), setAttribute(), setDefaultValue(), setHtmlId(), setOmitted(), setOption(), setRequired(), setTranslator(), translate(), validate()
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
public boolean $checkAllowedValues
#TRUE
Properties inherited from Nette\Forms\Controls\BaseControl
$caption, $control, $disabled, $idMask, $label, $value
Magic properties summary
public array $items
public read-only mixed $selectedItem
Magic properties inherited from Nette\Forms\Controls\BaseControl
$control, $controlPrototype, $disabled, $errors, $form, $htmlId, $htmlName, $label, $labelPrototype, $omitted, $required, $value
Magic properties inherited from Nette\ComponentModel\Component
$name, $parent
Magic properties inherited from Nette\Object
$reflection
Nette 2.3.8 API API documentation generated by ApiGen 2.8.0