added section name for meta-fields positioning (#5747)
This commit is contained in:
@@ -67,6 +67,7 @@ trait MetaTableTypeTrait
|
||||
*/
|
||||
private mixed $data = null;
|
||||
private bool $updated = false;
|
||||
private ?string $section = null;
|
||||
|
||||
public function getName(): ?string
|
||||
{
|
||||
@@ -193,13 +194,11 @@ trait MetaTableTypeTrait
|
||||
|
||||
public function merge(MetaTableTypeInterface $meta): MetaTableTypeInterface
|
||||
{
|
||||
$this
|
||||
->setConstraints($meta->getConstraints())
|
||||
->setIsRequired($meta->isRequired())
|
||||
->setIsVisible($meta->isVisible())
|
||||
->setOptions($meta->getOptions())
|
||||
->setOrder($meta->getOrder())
|
||||
;
|
||||
$this->setConstraints($meta->getConstraints());
|
||||
$this->setIsRequired($meta->isRequired());
|
||||
$this->setIsVisible($meta->isVisible());
|
||||
$this->setOptions($meta->getOptions());
|
||||
$this->setOrder($meta->getOrder());
|
||||
|
||||
if ($meta->getLabel() !== null) {
|
||||
$this->setLabel($meta->getLabel());
|
||||
@@ -209,6 +208,10 @@ trait MetaTableTypeTrait
|
||||
$this->setType($meta->getType());
|
||||
}
|
||||
|
||||
if ($meta->getSection() !== null) {
|
||||
$this->setSection($meta->getSection());
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
@@ -266,6 +269,16 @@ trait MetaTableTypeTrait
|
||||
}
|
||||
}
|
||||
|
||||
public function setSection(?string $section): void
|
||||
{
|
||||
$this->section = $section;
|
||||
}
|
||||
|
||||
public function getSection(): ?string
|
||||
{
|
||||
return $this->section;
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether this field is defined by a plugin or just a value stored in the database.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user