added support for ordering meta fields (#1940)
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user