| @@ 98-110 (lines=13) @@ | ||
| 95 | * |
|
| 96 | * @return array|bool |
|
| 97 | */ |
|
| 98 | public function getItem($category, $item_id, $dirname = null) |
|
| 99 | { |
|
| 100 | $xoops = Xoops::getInstance(); |
|
| 101 | if (!isset($dirname)) { |
|
| 102 | $dirname = $xoops->module->getVar('dirname'); |
|
| 103 | } |
|
| 104 | ||
| 105 | /* @var $plugin NotificationsPluginInterface */ |
|
| 106 | if ($plugin = \Xoops\Module\Plugin::getPlugin($dirname, 'notifications')) { |
|
| 107 | return $plugin->item($category, (int)($item_id)); |
|
| 108 | } |
|
| 109 | return false; |
|
| 110 | } |
|
| 111 | ||
| 112 | /** |
|
| 113 | * @param string $category |
|
| @@ 120-132 (lines=13) @@ | ||
| 117 | * |
|
| 118 | * @return array|bool |
|
| 119 | */ |
|
| 120 | public function getTags($category, $item_id, $event, $dirname = null) |
|
| 121 | { |
|
| 122 | $xoops = Xoops::getInstance(); |
|
| 123 | if (!isset($dirname)) { |
|
| 124 | $dirname = $xoops->module->getVar('dirname'); |
|
| 125 | } |
|
| 126 | ||
| 127 | /* @var $plugin NotificationsPluginInterface */ |
|
| 128 | if ($plugin = \Xoops\Module\Plugin::getPlugin($dirname, 'notifications')) { |
|
| 129 | return $plugin->tags($category, (int)($item_id), $event, $dirname); |
|
| 130 | } |
|
| 131 | return array(); |
|
| 132 | } |
|
| 133 | ||
| 134 | /** |
|
| 135 | * Get an associative array of info for a particular notification |
|