Allow identifying whether the current item is the filtered one
This commit is contained in:
parent
3dec30d0e0
commit
7707bbe648
|
@ -44,6 +44,12 @@ class ActivityManager implements IManager {
|
|||
/** @var IConfig */
|
||||
protected $config;
|
||||
|
||||
/** @var string */
|
||||
protected $formattingObjectType;
|
||||
|
||||
/** @var int */
|
||||
protected $formattingObjectId;
|
||||
|
||||
/**
|
||||
* constructor of the controller
|
||||
*
|
||||
|
@ -303,6 +309,24 @@ class ActivityManager implements IManager {
|
|||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $type
|
||||
* @param int $id
|
||||
*/
|
||||
public function setFormattingObject($type, $id) {
|
||||
$this->formattingObjectType = $type;
|
||||
$this->formattingObjectId = $id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function isFormattingFilteredObject() {
|
||||
return 'filter' === $this->request->getParam('filter')
|
||||
&& $this->formattingObjectType === $this->request->getParam('objecttype')
|
||||
&& $this->formattingObjectId === $this->request->getParam('objectid');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $app
|
||||
* @param string $text
|
||||
|
|
|
@ -137,6 +137,19 @@ interface IManager {
|
|||
*/
|
||||
public function getTypeIcon($type);
|
||||
|
||||
/**
|
||||
* @param string $type
|
||||
* @param int $id
|
||||
* @since 8.2.0
|
||||
*/
|
||||
public function setFormattingObject($type, $id);
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
* @since 8.2.0
|
||||
*/
|
||||
public function isFormattingFilteredObject();
|
||||
|
||||
/**
|
||||
* @param string $app
|
||||
* @param string $text
|
||||
|
|
Loading…
Reference in New Issue