handle hidden activities #33 (#58)

* refactored toolbars forms for re-usage #33
This commit is contained in:
Kevin Papst
2018-01-09 12:05:45 +01:00
committed by GitHub
parent a3e7a484d1
commit 964eaea2d0
20 changed files with 351 additions and 168 deletions

View File

@@ -28,6 +28,10 @@ class BaseQuery
const RESULT_TYPE_PAGER = 'PagerFanta';
const RESULT_TYPE_QUERYBUILDER = 'QueryBuilder';
/**
* @var \stdClass
*/
protected $hiddenEntity;
/**
* @var int
*/
@@ -146,4 +150,23 @@ class BaseQuery
}
return $this;
}
/**
* @return \stdClass
*/
public function getHiddenEntity()
{
return $this->hiddenEntity;
}
/**
* @param \stdClass $hiddenEntity
* @return BaseQuery
*/
public function setHiddenEntity($hiddenEntity)
{
$this->hiddenEntity = $hiddenEntity;
return $this;
}
}

View File

@@ -18,7 +18,14 @@ namespace AppBundle\Repository\Query;
*/
trait VisibilityTrait
{
/**
* @var integer
*/
protected $visibility = self::SHOW_VISIBLE;
/**
* @var bool
*/
protected $exclusiveVisibility = false;
/**
* @return int
@@ -39,4 +46,25 @@ trait VisibilityTrait
}
return $this;
}
/**
* @return bool
*/
public function isExclusiveVisibility()
{
return $this->exclusiveVisibility;
}
/**
* If set to true, this will ONLY filter the visibility on the main queried object.
*
* @param bool $exclusiveVisibility
* @return VisibilityTrait
*/
public function setExclusiveVisibility($exclusiveVisibility)
{
$this->exclusiveVisibility = (bool) $exclusiveVisibility;
return $this;
}
}