Skip to content
Snippets Groups Projects
Commit 7707bbe6 authored by Joas Schilling's avatar Joas Schilling
Browse files

Allow identifying whether the current item is the filtered one

parent 3dec30d0
Branches
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment