added table-column ordering (#1086)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user