The trait Idable provides a method equalsId that in turn relies on the
method getId(). If this method does not exist on a class mixing in this
trait, the method will fail.
Adding the getId() as an abstract method to the trait will make sure it
is available.
Loading history...
28
1
if (null !== $add) {
29
1
$group->addElement($add);
30
}
31
}
32
}
33
1
if (empty($group)) {
34
trigger_error('No valid elements specified for display group');
35
}
36
37
1
$name = (string)$name;
38
1
$group->setLegend($name);
39
40
1
$this->_displayGroups[$name] = $group;
41
42
1
return $this;
43
}
44
45
/**
46
* @return Nip_Form_DisplayGroup
47
*/
48
1
public function newDisplayGroup()
49
{
50
1
$group = new Nip_Form_DisplayGroup();
51
1
$group->setForm($this);
52
53
1
return $group;
54
}
55
56
/**
57
* @param string $name
58
* @return Nip_Form_DisplayGroup
59
*/
60
1
public function getDisplayGroup($name)
61
{
62
1
if (array_key_exists($name, $this->_displayGroups)) {
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: