Skip to content
This repository
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 30 lines (27 sloc) 0.731 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
<?php
/**
* Simple label tag. This can be used to add extra text in your forms.
* Consider using a {@link ReadonlyField} if you need to display a label
* AND a value.
*
* @package forms
* @subpackage fields-dataless
*/
class LabelField extends DatalessField {

/**
* @param string $name
* @param string $title
* @param Form $form
*/
function __construct($name, $title) {
// legacy handling for old parameters: $title, $heading, ...
// instead of new handling: $name, $title, $heading, ...
$args = func_get_args();
if(!isset($args[1])) {
$title = (isset($args[0])) ? $args[0] : null;
$name = $title;
$form = (isset($args[3])) ? $args[3] : null;
}

parent::__construct($name, $title);
}

}
Something went wrong with that request. Please try again.