Skip to content

Commit

Permalink
API CHANGE Removed $className and $allowHTML from DatalessField const…
Browse files Browse the repository at this point in the history
…ructor to support LabelField changes
  • Loading branch information
Sean Harvey committed Mar 16, 2011
1 parent 2c6cdd8 commit 180185d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 17 deletions.
14 changes: 0 additions & 14 deletions forms/DatalessField.php
Expand Up @@ -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.
Expand Down
4 changes: 1 addition & 3 deletions forms/LabelField.php
Expand Up @@ -21,12 +21,10 @@ function __construct($name, $title, $form = null) {
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);
}

/**
Expand Down

0 comments on commit 180185d

Please sign in to comment.