mirror of
https://github.com/Icinga/icingadb-web.git
synced 2026-06-09 00:32:05 -04:00
Add variable type hint to Icinga::app()'s returned object
This commit is contained in:
parent
239c33ade9
commit
d2f1a4dbde
3 changed files with 12 additions and 4 deletions
|
|
@ -5,6 +5,7 @@
|
|||
namespace Icinga\Module\Icingadb\Data;
|
||||
|
||||
use Icinga\Application\Icinga;
|
||||
use Icinga\Application\Web;
|
||||
use ipl\Orm\Query;
|
||||
use ipl\Stdlib\Contract\Paginatable;
|
||||
use ipl\Stdlib\Filter;
|
||||
|
|
@ -209,9 +210,10 @@ class PivotTable
|
|||
*/
|
||||
protected function getPaginationParameter(string $axis, string $param, int $default = null): int
|
||||
{
|
||||
$request = Icinga::app()->getRequest();
|
||||
/** @var Web $app */
|
||||
$app = Icinga::app();
|
||||
|
||||
$value = $request->getParam($param, '');
|
||||
$value = $app->getRequest()->getParam($param, '');
|
||||
if (strpos($value, ',') > 0) {
|
||||
$parts = explode(',', $value, 2);
|
||||
return intval($parts[$axis === 'x' ? 0 : 1]);
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ use Icinga\Application\Config;
|
|||
use Icinga\Application\Icinga;
|
||||
use Icinga\Application\Logger;
|
||||
use Icinga\Application\Version;
|
||||
use Icinga\Application\Web;
|
||||
use Icinga\Data\ConfigObject;
|
||||
use Icinga\Date\DateFormatter;
|
||||
use Icinga\Exception\ConfigurationError;
|
||||
|
|
@ -535,7 +536,9 @@ class Controller extends CompatController
|
|||
|
||||
protected function moduleInit()
|
||||
{
|
||||
Icinga::app()->getFrontController()
|
||||
/** @var Web $app */
|
||||
$app = Icinga::app();
|
||||
$app->getFrontController()
|
||||
->getPlugin('Zend_Controller_Plugin_ErrorHandler')
|
||||
->setErrorHandlerModule('icingadb');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ use Icinga\Application\Hook;
|
|||
use Icinga\Application\Hook\GrapherHook;
|
||||
use Icinga\Application\Icinga;
|
||||
use Icinga\Application\Logger;
|
||||
use Icinga\Application\Web;
|
||||
use Icinga\Date\DateFormatter;
|
||||
use Icinga\Exception\IcingaException;
|
||||
use Icinga\Module\Icingadb\Common\Auth;
|
||||
|
|
@ -483,8 +484,10 @@ class ObjectDetail extends BaseHtmlElement
|
|||
}
|
||||
|
||||
try {
|
||||
/** @var Web $app */
|
||||
$app = Icinga::app();
|
||||
$renderedExtension = $extension
|
||||
->setView(Icinga::app()->getViewRenderer()->view)
|
||||
->setView($app->getViewRenderer()->view)
|
||||
->getHtmlForObject($this->compatObject());
|
||||
|
||||
$extensionHtml = new HtmlElement(
|
||||
|
|
|
|||
Loading…
Reference in a new issue