-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SpecialController: allow to link special pages
fixes #39
- Loading branch information
1 parent
4565b4b
commit 13a50ef
Showing
1 changed file
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
|
||
namespace Icinga\Module\Pnp\Controllers; | ||
|
||
use Icinga\Module\Pnp\Web\Controller; | ||
|
||
class SpecialController extends Controller | ||
{ | ||
public function indexAction() | ||
{ | ||
$url = $this->getRequest()->getUrl(); | ||
$queryString = $url->getQueryString(); | ||
|
||
$this->view->url = \sprintf( | ||
'%s/special?%s', | ||
$this->getBaseUrl(), | ||
$queryString | ||
); | ||
|
||
$this->getTabs()->add('special', [ | ||
'label' => $this->translate('Special'), | ||
'url' => $url, | ||
])->activate('special'); | ||
|
||
$this->setViewScript('index/iframe'); | ||
} | ||
} |