Skip to content

Commit

Permalink
removed deprecated stuff in 2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Dec 4, 2013
1 parent c50f25e commit aabdc14
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 29 deletions.
6 changes: 1 addition & 5 deletions src/Forms/Controls/RadioList.php
Expand Up @@ -49,12 +49,8 @@ public function __construct($label = NULL, array $items = NULL)
* Returns selected radio value.
* @return mixed
*/
public function getValue($raw = FALSE)
public function getValue()
{
if ($raw) {
trigger_error(__METHOD__ . '(TRUE) is deprecated; use getRawValue() instead.', E_USER_DEPRECATED);
return $this->getRawValue();
}
return parent::getValue();
}

Expand Down
7 changes: 0 additions & 7 deletions src/Forms/Controls/SelectBox.php
Expand Up @@ -40,13 +40,6 @@ class SelectBox extends ChoiceControl
*/
public function setPrompt($prompt)
{
if ($prompt === TRUE) { // back compatibility
trigger_error(__METHOD__ . '(TRUE) is deprecated; argument must be string.', E_USER_DEPRECATED);
$items = $this->getItems();
$prompt = reset($items);
unset($this->options[key($items)], $items[key($items)]);
$this->setItems($items);
}
$this->prompt = $prompt;
return $this;
}
Expand Down
9 changes: 0 additions & 9 deletions src/Forms/Controls/TextInput.php
Expand Up @@ -57,15 +57,6 @@ public function setType($type)
}


/** @deprecated */
public function setPasswordMode($mode = TRUE)
{
trigger_error(__METHOD__ . '() is deprecated; use setType("password") instead.', E_USER_DEPRECATED);
$this->control->type = $mode ? 'password' : 'text';
return $this;
}


/**
* Generates control's HTML element.
* @return Nette\Utils\Html
Expand Down
8 changes: 0 additions & 8 deletions src/Forms/Validator.php
Expand Up @@ -221,14 +221,6 @@ public static function validateUrl(IControl $control)
}


/** @deprecated */
public static function validateRegexp(IControl $control, $regexp)
{
trigger_error('Validator REGEXP is deprecated; use PATTERN instead (which is matched against the entire value and is case sensitive).', E_USER_DEPRECATED);
return (bool) Strings::match($control->getValue(), $regexp);
}


/**
* Matches control's value regular expression?
* @return bool
Expand Down

0 comments on commit aabdc14

Please sign in to comment.