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\Project;
*/
class ActivityQuery extends ProjectQuery
{
public const ACTIVITY_ORDER_ALLOWED = ['id', 'name', 'comment', 'customer', 'project'];
/**
* @var Project|int|null
*/
@@ -28,7 +30,9 @@ class ActivityQuery extends ProjectQuery
public function __construct()
{
parent::__construct();
$this->setOrderBy('name');
$this->setDefaults([
'orderBy' => 'name',
]);
}
/**
@@ -68,24 +72,4 @@ class ActivityQuery extends ProjectQuery
return $this;
}
/**
* {@inheritdoc}
*/
public function isDirty(): bool
{
if (parent::isDirty()) {
return true;
}
if ($this->project !== null) {
return true;
}
if ($this->globalsOnly !== false) {
return true;
}
return false;
}
}