toolbar dropdown and visibility improvements (#933)

This commit is contained in:
Kevin Papst
2019-07-09 16:34:11 +02:00
committed by GitHub
parent b833e1ce27
commit c33a87a07c
74 changed files with 1317 additions and 631 deletions

View File

@@ -19,29 +19,16 @@ class ActivityQuery extends ProjectQuery
/**
* @var Project|int|null
*/
protected $project;
private $project;
/**
* @var bool
*/
protected $orderGlobalsFirst = false;
/**
* @var bool
*/
protected $globalsOnly = false;
private $globalsOnly = false;
/**
* @return bool
*/
public function isOrderGlobalsFirst(): bool
public function __construct()
{
return $this->orderGlobalsFirst;
}
public function setOrderGlobalsFirst(bool $orderGlobalsFirst): ActivityQuery
{
$this->orderGlobalsFirst = $orderGlobalsFirst;
return $this;
parent::__construct();
$this->setOrderBy('name');
}
/**
@@ -81,4 +68,24 @@ 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;
}
}