diff options
author | Joas Schilling <nickvergessen@owncloud.com> | 2015-10-02 09:53:39 +0200 |
---|---|---|
committer | Joas Schilling <nickvergessen@owncloud.com> | 2015-10-02 09:53:39 +0200 |
commit | 7707bbe6482c50cfda2529c8f0d7f8c7e1e52d48 (patch) | |
tree | 5b66a50e1035ec5a3750974c9da72f621e0a2940 /lib | |
parent | 3dec30d0e09128002f24f58b7ea042c42defce31 (diff) | |
download | nextcloud-server-7707bbe6482c50cfda2529c8f0d7f8c7e1e52d48.tar.gz nextcloud-server-7707bbe6482c50cfda2529c8f0d7f8c7e1e52d48.zip |
Allow identifying whether the current item is the filtered one
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/activitymanager.php | 24 | ||||
-rw-r--r-- | lib/public/activity/imanager.php | 13 |
2 files changed, 37 insertions, 0 deletions
diff --git a/lib/private/activitymanager.php b/lib/private/activitymanager.php index fc250173536..340f3d335e5 100644 --- a/lib/private/activitymanager.php +++ b/lib/private/activitymanager.php @@ -44,6 +44,12 @@ class ActivityManager implements IManager { /** @var IConfig */ protected $config; + /** @var string */ + protected $formattingObjectType; + + /** @var int */ + protected $formattingObjectId; + /** * constructor of the controller * @@ -304,6 +310,24 @@ class ActivityManager implements IManager { } /** + * @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 * @param array $params diff --git a/lib/public/activity/imanager.php b/lib/public/activity/imanager.php index b3a4969fb06..280babb7fa9 100644 --- a/lib/public/activity/imanager.php +++ b/lib/public/activity/imanager.php @@ -138,6 +138,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 * @param array $params |