mirror of
https://github.com/wintercms/winter.git
synced 2024-06-28 05:33:29 +02:00
Peer review of 1b3263d4c7004c7b036ab8ae8b8fee3cfb6928b5
This commit is contained in:
parent
5853cc54c4
commit
39987677f0
@ -177,21 +177,31 @@ class FormField
|
||||
public $preset;
|
||||
|
||||
/**
|
||||
* @var Backend\Widgets\Form The form that contains this field
|
||||
* @var object The parent object that contains this field
|
||||
*/
|
||||
public $form;
|
||||
protected $parent = null;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
* @param string $fieldName The name of the field
|
||||
* @param string $label The label of the field
|
||||
* @param Backend\Widgets\Form $form The containing form
|
||||
* @param object $parent The containing object instance, defaults to null
|
||||
*/
|
||||
public function __construct($fieldName, $label, $form)
|
||||
public function __construct($fieldName, $label, $parent = null)
|
||||
{
|
||||
$this->fieldName = $fieldName;
|
||||
$this->label = $label;
|
||||
$this->form = $form;
|
||||
$this->parent = $parent;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve the parent object for the field
|
||||
*
|
||||
* @return object|null
|
||||
*/
|
||||
public function getParent()
|
||||
{
|
||||
return $this->parent;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user