added support for ordering meta fields (#1940)

This commit is contained in:
Kevin Papst
2020-08-30 11:24:12 +02:00
committed by GitHub
parent e7da2b408a
commit 8e801c6829
9 changed files with 51 additions and 7 deletions

View File

@@ -89,6 +89,10 @@ trait MetaTableTypeTrait
* @var array
*/
private $options = [];
/**
* @var int
*/
private $order = 0;
public function getName(): ?string
{
@@ -216,6 +220,7 @@ trait MetaTableTypeTrait
->setIsVisible($meta->isVisible())
->setLabel($meta->getLabel())
->setOptions($meta->getOptions())
->setOrder($meta->getOrder())
;
return $this;
@@ -249,6 +254,18 @@ trait MetaTableTypeTrait
return $this->options;
}
public function getOrder(): int
{
return $this->order;
}
public function setOrder(int $order): MetaTableTypeInterface
{
$this->order = $order;
return $this;
}
public function __clone()
{
if ($this->id) {