Skip to content

Commit aabdc14

Browse files
committed
removed deprecated stuff in 2.1
1 parent c50f25e commit aabdc14

4 files changed

Lines changed: 1 addition & 29 deletions

File tree

src/Forms/Controls/RadioList.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,8 @@ public function __construct($label = NULL, array $items = NULL)
4949
* Returns selected radio value.
5050
* @return mixed
5151
*/
52-
public function getValue($raw = FALSE)
52+
public function getValue()
5353
{
54-
if ($raw) {
55-
trigger_error(__METHOD__ . '(TRUE) is deprecated; use getRawValue() instead.', E_USER_DEPRECATED);
56-
return $this->getRawValue();
57-
}
5854
return parent::getValue();
5955
}
6056

src/Forms/Controls/SelectBox.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,6 @@ class SelectBox extends ChoiceControl
4040
*/
4141
public function setPrompt($prompt)
4242
{
43-
if ($prompt === TRUE) { // back compatibility
44-
trigger_error(__METHOD__ . '(TRUE) is deprecated; argument must be string.', E_USER_DEPRECATED);
45-
$items = $this->getItems();
46-
$prompt = reset($items);
47-
unset($this->options[key($items)], $items[key($items)]);
48-
$this->setItems($items);
49-
}
5043
$this->prompt = $prompt;
5144
return $this;
5245
}

src/Forms/Controls/TextInput.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,6 @@ public function setType($type)
5757
}
5858

5959

60-
/** @deprecated */
61-
public function setPasswordMode($mode = TRUE)
62-
{
63-
trigger_error(__METHOD__ . '() is deprecated; use setType("password") instead.', E_USER_DEPRECATED);
64-
$this->control->type = $mode ? 'password' : 'text';
65-
return $this;
66-
}
67-
68-
6960
/**
7061
* Generates control's HTML element.
7162
* @return Nette\Utils\Html

src/Forms/Validator.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -221,14 +221,6 @@ public static function validateUrl(IControl $control)
221221
}
222222

223223

224-
/** @deprecated */
225-
public static function validateRegexp(IControl $control, $regexp)
226-
{
227-
trigger_error('Validator REGEXP is deprecated; use PATTERN instead (which is matched against the entire value and is case sensitive).', E_USER_DEPRECATED);
228-
return (bool) Strings::match($control->getValue(), $regexp);
229-
}
230-
231-
232224
/**
233225
* Matches control's value regular expression?
234226
* @return bool

0 commit comments

Comments
 (0)