* refactored toolbars forms for re-usage #33
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user