Declare property `$view` for helpers in monitoring modules

The property `$view` with type `Icinga\Web\View` is declared for helpers in `modules/monitoring/application/views/helpers`
directory.
This commit is contained in:
raviks789 2023-08-14 16:00:14 +02:00
parent d22d2fb1e0
commit a780d9790b
5 changed files with 24 additions and 0 deletions

View File

@ -1,8 +1,13 @@
<?php
/* Icinga Web 2 | (c) 2014 Icinga Development Team | GPLv2+ */
use Icinga\Web\View;
class Zend_View_Helper_Customvar extends Zend_View_Helper_Abstract
{
/** @var View */
public $view;
/**
* Create dispatch instance
*

View File

@ -1,8 +1,13 @@
<?php
/* Icinga Web 2 | (c) 2015 Icinga Development Team | GPLv2+ */
use Icinga\Web\View;
class Zend_View_Helper_HostFlags extends Zend_View_Helper_Abstract
{
/** @var View */
public $view;
public function hostFlags($host)
{
$icons = array();

View File

@ -2,12 +2,17 @@
/* Icinga Web 2 | (c) 2015 Icinga Development Team | GPLv2+ */
use Icinga\Module\Monitoring\Object\Macro;
use Icinga\Module\Monitoring\Object\MonitoredObject;
use Icinga\Web\View;
/**
* Generate icons to describe a given hosts state
*/
class Zend_View_Helper_IconImage extends Zend_View_Helper_Abstract
{
/** @var View */
public $view;
/**
* Create dispatch instance
*

View File

@ -4,9 +4,13 @@
use Icinga\Module\Monitoring\Plugin\Perfdata;
use Icinga\Module\Monitoring\Plugin\PerfdataSet;
use Icinga\Util\StringHelper;
use Icinga\Web\View;
class Zend_View_Helper_Perfdata extends Zend_View_Helper_Abstract
{
/** @var View */
public $view;
/**
* Display the given perfdata string to the user
*

View File

@ -1,8 +1,13 @@
<?php
/* Icinga Web 2 | (c) 2015 Icinga Development Team | GPLv2+ */
use Icinga\Web\View;
class Zend_View_Helper_ServiceFlags extends Zend_View_Helper_Abstract
{
/** @var View */
public $view;
public function serviceFlags($service)
{
$icons = array();