Generates control's HTML element.
public getControl ( ) : Nette\Utils\Html | ||
리턴 | Nette\Utils\Html |
public function getControl() { $control = parent::getControl(); $control->{'data-linkedelement'} = $this->linkedElement; $control->{'data-linkedproperty'} = $this->linkedProperty; return $control; }
/** * Generates control's HTML element. * @return Html */ public function getControl() { $items = $this->getPrompt() === FALSE ? array() : array('' => $this->translate($this->getPrompt())); $translated = array(); foreach ($this->items as $key => $value) { $translated[$key] = $this->translate($value); } asort($translated); return Helpers::createSelectBox($items + $translated, array('selected?' => $this->value, 'disabled:' => is_array($this->disabled) ? $this->disabled : NULL))->addAttributes(parent::getControl()->attrs); }
/** * @return Html * @throws InvalidStateException */ public function getControl() { $this->tryLoadItems(); $control = parent::getControl(); if ($this->multiple == TRUE) { $control->addAttributes(array('multiple' => TRUE)); } if ($this->dependentCallback !== NULL) { $form = $this->getForm(); if (!$form || !$form instanceof Form) { throw new InvalidStateException("DependentSelectBox supports only Nette\\Application\\UI\\Form."); } $control->attrs['data-dependentselectbox'] = $form->getPresenter()->link($this->lookupPath('Nette\\Application\\UI\\Presenter') . self::NAME_SEPARATOR . self::SIGNAL_NAME . '!'); $parents = array(); foreach ($this->parents as $parent) { $parents[$parent->getName()] = $parent->getHtmlId(); } $control->attrs['data-dependentselectbox-parents'] = Json::encode($parents); } return $control; }
/** * Generates control's HTML element. * @return Nette\Utils\Html */ public function getControl() { return parent::getControl()->multiple(TRUE); }
/** * Generates control's HTML element * * @return \Nette\Utils\Html */ public function getControl() { $control = parent::getControl(); $control->class = 'imageselectbox'; return $control; }
function getControl() { $control = parent::getControl(); $control->multiple = TRUE; return $control; }
parent::getHtmlName().'[]';}function getControl(){$control=parent::getControl();$control->multiple=TRUE;return$control;}static
/** * @return Nette\Utils\Html */ public function getControl() { if ($this->forceDisabled) { $this::setDisabled(TRUE); } return parent::getControl(); }