mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
API CHANGE Removed $className and $allowHTML from DatalessField constructor to support LabelField changes
This commit is contained in:
parent
2c6cdd8015
commit
180185db43
@ -13,20 +13,6 @@ class DatalessField extends FormField {
|
||||
*/
|
||||
protected $allowHTML;
|
||||
|
||||
/**
|
||||
* @param string $name
|
||||
* @param string $title The label itslef
|
||||
* @param string $class An HTML class to apply to the label (Deprecated: use addExtraClass())
|
||||
* @param boolean $allowHTML Determine if the tag content needs to be escaped (Deprecated: use setAllowHTML())
|
||||
* @param Form $form
|
||||
*/
|
||||
function __construct($name, $title = null, $className = "", $allowHTML = false, $form = null) {
|
||||
if($className) $this->extraClasses = array($className);
|
||||
$this->allowHTML = $allowHTML;
|
||||
|
||||
parent::__construct($name, $title, null, $form);
|
||||
}
|
||||
|
||||
/**
|
||||
* Function that returns whether this field contains data.
|
||||
* Always returns false.
|
||||
|
@ -21,12 +21,10 @@ class LabelField extends DatalessField {
|
||||
if(!isset($args[1])) {
|
||||
$title = (isset($args[0])) ? $args[0] : null;
|
||||
$name = $title;
|
||||
$classname = (isset($args[1])) ? $args[1] : null;
|
||||
$allowHTML = (isset($args[2])) ? $args[2] : null;
|
||||
$form = (isset($args[3])) ? $args[3] : null;
|
||||
}
|
||||
|
||||
parent::__construct($name, $title, null, $allowHTML, $form);
|
||||
parent::__construct($name, $title, $form);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user