added table-column ordering (#1086)

This commit is contained in:
Kevin Papst
2019-09-09 23:47:42 +02:00
committed by GitHub
parent d041a3f4f9
commit a651e55dc9
82 changed files with 932 additions and 516 deletions

View File

@@ -16,6 +16,8 @@ use App\Entity\Customer;
*/
class ProjectQuery extends CustomerQuery
{
public const PROJECT_ORDER_ALLOWED = ['id', 'name', 'comment', 'customer', 'orderNumber'];
/**
* @var Customer|int|null
*/
@@ -24,7 +26,9 @@ class ProjectQuery extends CustomerQuery
public function __construct()
{
parent::__construct();
$this->setOrderBy('name');
$this->setDefaults([
'orderBy' => 'name',
]);
}
/**
@@ -45,20 +49,4 @@ class ProjectQuery extends CustomerQuery
return $this;
}
/**
* {@inheritdoc}
*/
public function isDirty(): bool
{
if (parent::isDirty()) {
return true;
}
if ($this->customer !== null) {
return true;
}
return false;
}
}