mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-25 23:04:51 +02:00
PHPDoc: Use @var instead of @type
Becasue of too many kittens PSR-5 backed off of deprecating @var. So that's the way we go too.
This commit is contained in:
parent
6dc48fe9d3
commit
8563d5ed3f
@ -23,7 +23,7 @@ class ConfigController extends ActionController
|
|||||||
/**
|
/**
|
||||||
* The first allowed config action according to the user's permissions
|
* The first allowed config action according to the user's permissions
|
||||||
*
|
*
|
||||||
* @type string
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected $firstAllowedAction;
|
protected $firstAllowedAction;
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ class RoleForm extends ConfigForm
|
|||||||
/**
|
/**
|
||||||
* Provided permissions by currently loaded modules
|
* Provided permissions by currently loaded modules
|
||||||
*
|
*
|
||||||
* @type array
|
* @var array
|
||||||
*/
|
*/
|
||||||
protected $providedPermissions = array(
|
protected $providedPermissions = array(
|
||||||
'*' => '*',
|
'*' => '*',
|
||||||
@ -33,7 +33,7 @@ class RoleForm extends ConfigForm
|
|||||||
/**
|
/**
|
||||||
* Provided restrictions by currently loaded modules
|
* Provided restrictions by currently loaded modules
|
||||||
*
|
*
|
||||||
* @type array
|
* @var array
|
||||||
*/
|
*/
|
||||||
protected $providedRestrictions = array();
|
protected $providedRestrictions = array();
|
||||||
|
|
||||||
@ -46,11 +46,11 @@ class RoleForm extends ConfigForm
|
|||||||
$helper = new Zend_Form_Element('bogus');
|
$helper = new Zend_Form_Element('bogus');
|
||||||
foreach (Icinga::app()->getModuleManager()->getLoadedModules() as $module) {
|
foreach (Icinga::app()->getModuleManager()->getLoadedModules() as $module) {
|
||||||
foreach ($module->getProvidedPermissions() as $permission) {
|
foreach ($module->getProvidedPermissions() as $permission) {
|
||||||
/** @type object $permission */
|
/** @var object $permission */
|
||||||
$this->providedPermissions[$permission->name] = $permission->name . ': ' . $permission->description;
|
$this->providedPermissions[$permission->name] = $permission->name . ': ' . $permission->description;
|
||||||
}
|
}
|
||||||
foreach ($module->getProvidedRestrictions() as $restriction) {
|
foreach ($module->getProvidedRestrictions() as $restriction) {
|
||||||
/** @type object $restriction */
|
/** @var object $restriction */
|
||||||
$name = $helper->filterName($restriction->name); // Zend only permits alphanumerics, the underscore,
|
$name = $helper->filterName($restriction->name); // Zend only permits alphanumerics, the underscore,
|
||||||
// the circumflex and any ASCII character in range
|
// the circumflex and any ASCII character in range
|
||||||
// \x7f to \xff (127 to 255)
|
// \x7f to \xff (127 to 255)
|
||||||
|
@ -115,7 +115,7 @@ abstract class ApplicationBootstrap
|
|||||||
/**
|
/**
|
||||||
* Whether Icinga Web 2 requires setup
|
* Whether Icinga Web 2 requires setup
|
||||||
*
|
*
|
||||||
* @type bool
|
* @var bool
|
||||||
*/
|
*/
|
||||||
protected $requiresSetup = false;
|
protected $requiresSetup = false;
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ abstract class Command
|
|||||||
protected $docs;
|
protected $docs;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @type Params
|
* @var Params
|
||||||
*/
|
*/
|
||||||
protected $params;
|
protected $params;
|
||||||
protected $screen;
|
protected $screen;
|
||||||
|
@ -14,14 +14,14 @@ class SimpleTree implements IteratorAggregate
|
|||||||
/**
|
/**
|
||||||
* Root node
|
* Root node
|
||||||
*
|
*
|
||||||
* @type TreeNode
|
* @var TreeNode
|
||||||
*/
|
*/
|
||||||
protected $sentinel;
|
protected $sentinel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Nodes
|
* Nodes
|
||||||
*
|
*
|
||||||
* @type array
|
* @var array
|
||||||
*/
|
*/
|
||||||
protected $nodes = array();
|
protected $nodes = array();
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ class TreeNode implements Identifiable
|
|||||||
/**
|
/**
|
||||||
* The node's ID
|
* The node's ID
|
||||||
*
|
*
|
||||||
* @type mixed
|
* @var mixed
|
||||||
*/
|
*/
|
||||||
protected $id;
|
protected $id;
|
||||||
|
|
||||||
@ -24,7 +24,7 @@ class TreeNode implements Identifiable
|
|||||||
/**
|
/**
|
||||||
* The node's children
|
* The node's children
|
||||||
*
|
*
|
||||||
* @type array
|
* @var array
|
||||||
*/
|
*/
|
||||||
protected $children = array();
|
protected $children = array();
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ class TreeNodeIterator implements RecursiveIterator
|
|||||||
/**
|
/**
|
||||||
* The node's children
|
* The node's children
|
||||||
*
|
*
|
||||||
* @type array
|
* @var array
|
||||||
*/
|
*/
|
||||||
protected $children;
|
protected $children;
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@ class FileExtensionFilterIterator extends FilterIterator
|
|||||||
/**
|
/**
|
||||||
* The extension to filter for
|
* The extension to filter for
|
||||||
*
|
*
|
||||||
* @type string
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected $extension;
|
protected $extension;
|
||||||
|
|
||||||
@ -58,7 +58,7 @@ class FileExtensionFilterIterator extends FilterIterator
|
|||||||
public function accept()
|
public function accept()
|
||||||
{
|
{
|
||||||
$current = $this->current();
|
$current = $this->current();
|
||||||
/** @type $current \SplFileInfo */
|
/** @var $current \SplFileInfo */
|
||||||
if (! $current->isFile()) {
|
if (! $current->isFile()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -37,7 +37,7 @@ class NonEmptyFileIterator extends FilterIterator
|
|||||||
public function accept()
|
public function accept()
|
||||||
{
|
{
|
||||||
$current = $this->current();
|
$current = $this->current();
|
||||||
/** @type $current \SplFileInfo */
|
/** @var $current \SplFileInfo */
|
||||||
if (! $current->isFile()
|
if (! $current->isFile()
|
||||||
|| $current->getSize() === 0
|
|| $current->getSize() === 0
|
||||||
) {
|
) {
|
||||||
|
@ -51,7 +51,7 @@ class ActionController extends Zend_Controller_Action
|
|||||||
/**
|
/**
|
||||||
* Authentication manager
|
* Authentication manager
|
||||||
*
|
*
|
||||||
* @type Manager|null
|
* @var Manager|null
|
||||||
*/
|
*/
|
||||||
private $auth;
|
private $auth;
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@ class DomNodeIterator implements RecursiveIterator
|
|||||||
/**
|
/**
|
||||||
* The node's children
|
* The node's children
|
||||||
*
|
*
|
||||||
* @type IteratorIterator
|
* @var IteratorIterator
|
||||||
*/
|
*/
|
||||||
protected $children;
|
protected $children;
|
||||||
|
|
||||||
|
@ -145,7 +145,7 @@ class Form extends Zend_Form
|
|||||||
/**
|
/**
|
||||||
* Authentication manager
|
* Authentication manager
|
||||||
*
|
*
|
||||||
* @type Manager|null
|
* @var Manager|null
|
||||||
*/
|
*/
|
||||||
private $auth;
|
private $auth;
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ class Menu implements RecursiveIterator
|
|||||||
/**
|
/**
|
||||||
* The id of this menu
|
* The id of this menu
|
||||||
*
|
*
|
||||||
* @type string
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected $id;
|
protected $id;
|
||||||
|
|
||||||
@ -27,7 +27,7 @@ class Menu implements RecursiveIterator
|
|||||||
*
|
*
|
||||||
* Used for sorting when priority is unset or equal to other items
|
* Used for sorting when priority is unset or equal to other items
|
||||||
*
|
*
|
||||||
* @type string
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected $title;
|
protected $title;
|
||||||
|
|
||||||
@ -36,42 +36,42 @@ class Menu implements RecursiveIterator
|
|||||||
*
|
*
|
||||||
* Used for sorting
|
* Used for sorting
|
||||||
*
|
*
|
||||||
* @type int
|
* @var int
|
||||||
*/
|
*/
|
||||||
protected $priority = 100;
|
protected $priority = 100;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The url of this menu
|
* The url of this menu
|
||||||
*
|
*
|
||||||
* @type string
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected $url;
|
protected $url;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The path to the icon of this menu
|
* The path to the icon of this menu
|
||||||
*
|
*
|
||||||
* @type string
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected $icon;
|
protected $icon;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The sub menus of this menu
|
* The sub menus of this menu
|
||||||
*
|
*
|
||||||
* @type array
|
* @var array
|
||||||
*/
|
*/
|
||||||
protected $subMenus = array();
|
protected $subMenus = array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A custom item renderer used instead of the default rendering logic
|
* A custom item renderer used instead of the default rendering logic
|
||||||
*
|
*
|
||||||
* @type MenuItemRenderer
|
* @var MenuItemRenderer
|
||||||
*/
|
*/
|
||||||
protected $itemRenderer = null;
|
protected $itemRenderer = null;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Parent menu
|
* Parent menu
|
||||||
*
|
*
|
||||||
* @type Menu
|
* @var Menu
|
||||||
*/
|
*/
|
||||||
protected $parent;
|
protected $parent;
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ class View extends Zend_View_Abstract
|
|||||||
/**
|
/**
|
||||||
* Authentication manager
|
* Authentication manager
|
||||||
*
|
*
|
||||||
* @type \Icinga\Authentication\Manager|null
|
* @var \Icinga\Authentication\Manager|null
|
||||||
*/
|
*/
|
||||||
private $auth;
|
private $auth;
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<div class="controls">
|
<div class="controls">
|
||||||
<?= /** @type \Icinga\Web\Widget\Tabs $tabs */ $tabs->showOnlyCloseButton() ?>
|
<?= /** @var \Icinga\Web\Widget\Tabs $tabs */ $tabs->showOnlyCloseButton() ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<?= /** @type \Icinga\Module\Doc\Renderer\DocSectionRenderer $section */ $section ?>
|
<?= /** @var \Icinga\Module\Doc\Renderer\DocSectionRenderer $section */ $section ?>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<div class="controls"></div>
|
<div class="controls"></div>
|
||||||
<?= /** @type \Icinga\Web\Widget\Tabs $tabs */ $tabs->showOnlyCloseButton(); ?>
|
<?= /** @var \Icinga\Web\Widget\Tabs $tabs */ $tabs->showOnlyCloseButton(); ?>
|
||||||
<h1><?= $this->translate('Available documentations'); ?></h1>
|
<h1><?= $this->translate('Available documentations'); ?></h1>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<ul>
|
<ul>
|
||||||
@ -16,4 +16,4 @@
|
|||||||
array('title' => $this->translate('List all modifications for which documentation is available'))
|
array('title' => $this->translate('List all modifications for which documentation is available'))
|
||||||
); ?></li>
|
); ?></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<div class="controls">
|
<div class="controls">
|
||||||
<?= /** @type \Icinga\Web\Widget\Tabs $tabs */ $tabs->showOnlyCloseButton(); ?>
|
<?= /** @var \Icinga\Web\Widget\Tabs $tabs */ $tabs->showOnlyCloseButton(); ?>
|
||||||
<h1><?= $this->translate('Module documentations'); ?></h1>
|
<h1><?= $this->translate('Module documentations'); ?></h1>
|
||||||
</div>
|
</div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
@ -16,4 +16,4 @@
|
|||||||
); ?></li>
|
); ?></li>
|
||||||
<?php endforeach ?>
|
<?php endforeach ?>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<div class="content">
|
<div class="content">
|
||||||
<h1><?= /** @type string $title */ $title ?></h1>
|
<h1><?= /** @var string $title */ $title ?></h1>
|
||||||
<?= /** @type \Icinga\Module\Doc\Renderer\DocTocRenderer $toc */ $toc ?>
|
<?= /** @var \Icinga\Module\Doc\Renderer\DocTocRenderer $toc */ $toc ?>
|
||||||
<?= /** @type \Icinga\Module\Doc\Renderer\DocSectionRenderer $section */ $section ?>
|
<?= /** @var \Icinga\Module\Doc\Renderer\DocSectionRenderer $section */ $section ?>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<div class="content">
|
<div class="content">
|
||||||
<?php foreach (/** @type \Icinga\Module\Doc\Renderer\DocSearchRenderer[] $searches */ $searches as $title => $search): ?>
|
<?php foreach (/** @var \Icinga\Module\Doc\Renderer\DocSearchRenderer[] $searches */ $searches as $title => $search): ?>
|
||||||
<?php if (! $search->isEmpty()): ?>
|
<?php if (! $search->isEmpty()): ?>
|
||||||
<h1><?= $this->escape($title) ?></h1>
|
<h1><?= $this->escape($title) ?></h1>
|
||||||
<?= $search ?>
|
<?= $search ?>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<div class="controls">
|
<div class="controls">
|
||||||
<?= /** @type \Icinga\Web\Widget\Tabs $tabs */ $tabs->showOnlyCloseButton() ?>
|
<?= /** @var \Icinga\Web\Widget\Tabs $tabs */ $tabs->showOnlyCloseButton() ?>
|
||||||
<h1><?= /** @type string $title */ $title ?></h1>
|
<h1><?= /** @var string $title */ $title ?></h1>
|
||||||
</div>
|
</div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<?= /** @type \Icinga\Module\Doc\Renderer\DocTocRenderer $toc */ $toc ?>
|
<?= /** @var \Icinga\Module\Doc\Renderer\DocTocRenderer $toc */ $toc ?>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Icinga Web 2 | (c) 2013-2015 Icinga Development Team | GPLv2+ */
|
/* Icinga Web 2 | (c) 2013-2015 Icinga Development Team | GPLv2+ */
|
||||||
|
|
||||||
/** @type $this \Icinga\Application\Modules\Module */
|
/** @var $this \Icinga\Application\Modules\Module */
|
||||||
|
|
||||||
$section = $this->menuSection($this->translate('Documentation'), array(
|
$section = $this->menuSection($this->translate('Documentation'), array(
|
||||||
'title' => 'Documentation',
|
'title' => 'Documentation',
|
||||||
|
@ -19,7 +19,7 @@ class DocIterator implements Countable, IteratorAggregate
|
|||||||
/**
|
/**
|
||||||
* Ordered files
|
* Ordered files
|
||||||
*
|
*
|
||||||
* @type array
|
* @var array
|
||||||
*/
|
*/
|
||||||
protected $fileInfo;
|
protected $fileInfo;
|
||||||
|
|
||||||
|
@ -18,14 +18,14 @@ class DocParser
|
|||||||
/**
|
/**
|
||||||
* Path to the documentation
|
* Path to the documentation
|
||||||
*
|
*
|
||||||
* @type string
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected $path;
|
protected $path;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Iterator over documentation files
|
* Iterator over documentation files
|
||||||
*
|
*
|
||||||
* @type DocIterator
|
* @var DocIterator
|
||||||
*/
|
*/
|
||||||
protected $docIterator;
|
protected $docIterator;
|
||||||
|
|
||||||
@ -130,7 +130,7 @@ class DocParser
|
|||||||
$tree = new SimpleTree();
|
$tree = new SimpleTree();
|
||||||
$stack = new SplStack();
|
$stack = new SplStack();
|
||||||
foreach ($this->docIterator as $fileInfo) {
|
foreach ($this->docIterator as $fileInfo) {
|
||||||
/** @type $fileInfo \SplFileInfo */
|
/** @var $fileInfo \SplFileInfo */
|
||||||
$file = $fileInfo->openFile();
|
$file = $fileInfo->openFile();
|
||||||
$lastLine = null;
|
$lastLine = null;
|
||||||
foreach ($file as $line) {
|
foreach ($file as $line) {
|
||||||
@ -143,7 +143,7 @@ class DocParser
|
|||||||
if ($id === null) {
|
if ($id === null) {
|
||||||
$path = array();
|
$path = array();
|
||||||
foreach ($stack as $section) {
|
foreach ($stack as $section) {
|
||||||
/** @type $section DocSection */
|
/** @var $section DocSection */
|
||||||
$path[] = $section->getTitle();
|
$path[] = $section->getTitle();
|
||||||
}
|
}
|
||||||
$path[] = $title;
|
$path[] = $title;
|
||||||
|
@ -13,35 +13,35 @@ class DocSection extends TreeNode
|
|||||||
/**
|
/**
|
||||||
* Chapter the section belongs to
|
* Chapter the section belongs to
|
||||||
*
|
*
|
||||||
* @type DocSection
|
* @var DocSection
|
||||||
*/
|
*/
|
||||||
protected $chapter;
|
protected $chapter;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Content of the section
|
* Content of the section
|
||||||
*
|
*
|
||||||
* @type array
|
* @var array
|
||||||
*/
|
*/
|
||||||
protected $content = array();
|
protected $content = array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Header level
|
* Header level
|
||||||
*
|
*
|
||||||
* @type int
|
* @var int
|
||||||
*/
|
*/
|
||||||
protected $level;
|
protected $level;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Whether to instruct search engines to not index the link to the section
|
* Whether to instruct search engines to not index the link to the section
|
||||||
*
|
*
|
||||||
* @type bool
|
* @var bool
|
||||||
*/
|
*/
|
||||||
protected $noFollow;
|
protected $noFollow;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Title of the section
|
* Title of the section
|
||||||
*
|
*
|
||||||
* @type string
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected $title;
|
protected $title;
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ class DocSectionFilterIterator extends RecursiveFilterIterator implements Counta
|
|||||||
/**
|
/**
|
||||||
* Chapter to filter for
|
* Chapter to filter for
|
||||||
*
|
*
|
||||||
* @type string
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected $chapter;
|
protected $chapter;
|
||||||
|
|
||||||
@ -44,7 +44,7 @@ class DocSectionFilterIterator extends RecursiveFilterIterator implements Counta
|
|||||||
public function accept()
|
public function accept()
|
||||||
{
|
{
|
||||||
$section = $this->current();
|
$section = $this->current();
|
||||||
/** @type \Icinga\Module\Doc\DocSection $section */
|
/** @var \Icinga\Module\Doc\DocSection $section */
|
||||||
if ($section->getChapter()->getId() === $this->chapter) {
|
if ($section->getChapter()->getId() === $this->chapter) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -16,21 +16,21 @@ abstract class DocRenderer extends RecursiveIteratorIterator
|
|||||||
/**
|
/**
|
||||||
* URL to replace links with
|
* URL to replace links with
|
||||||
*
|
*
|
||||||
* @type string
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected $url;
|
protected $url;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Additional URL parameters
|
* Additional URL parameters
|
||||||
*
|
*
|
||||||
* @type array
|
* @var array
|
||||||
*/
|
*/
|
||||||
protected $urlParams = array();
|
protected $urlParams = array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* View
|
* View
|
||||||
*
|
*
|
||||||
* @type View|null
|
* @var View|null
|
||||||
*/
|
*/
|
||||||
protected $view;
|
protected $view;
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ class DocSearchRenderer extends DocRenderer
|
|||||||
/**
|
/**
|
||||||
* The content to render
|
* The content to render
|
||||||
*
|
*
|
||||||
* @type array
|
* @var array
|
||||||
*/
|
*/
|
||||||
protected $content = array();
|
protected $content = array();
|
||||||
|
|
||||||
@ -105,7 +105,7 @@ class DocSearchRenderer extends DocRenderer
|
|||||||
$path,
|
$path,
|
||||||
array('highlight-search' => $this->getInnerIterator()->getSearch()->getInput())
|
array('highlight-search' => $this->getInnerIterator()->getSearch()->getInput())
|
||||||
);
|
);
|
||||||
/** @type \Icinga\Web\Url $url */
|
/** @var \Icinga\Web\Url $url */
|
||||||
$url->setAnchor($this->encodeAnchor($section->getId()));
|
$url->setAnchor($this->encodeAnchor($section->getId()));
|
||||||
$urlAttributes = array(
|
$urlAttributes = array(
|
||||||
'data-base-target' => '_next',
|
'data-base-target' => '_next',
|
||||||
|
@ -26,28 +26,28 @@ class DocSectionRenderer extends DocRenderer
|
|||||||
/**
|
/**
|
||||||
* Content to render
|
* Content to render
|
||||||
*
|
*
|
||||||
* @type array
|
* @var array
|
||||||
*/
|
*/
|
||||||
protected $content = array();
|
protected $content = array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Search criteria to highlight
|
* Search criteria to highlight
|
||||||
*
|
*
|
||||||
* @type string
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected $highlightSearch;
|
protected $highlightSearch;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parsedown instance
|
* Parsedown instance
|
||||||
*
|
*
|
||||||
* @type Parsedown
|
* @var Parsedown
|
||||||
*/
|
*/
|
||||||
protected $parsedown;
|
protected $parsedown;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Documentation tree
|
* Documentation tree
|
||||||
*
|
*
|
||||||
* @type SimpleTree
|
* @var SimpleTree
|
||||||
*/
|
*/
|
||||||
protected $tree;
|
protected $tree;
|
||||||
|
|
||||||
@ -169,7 +169,7 @@ class DocSectionRenderer extends DocRenderer
|
|||||||
$doc->loadHTML($match[0]);
|
$doc->loadHTML($match[0]);
|
||||||
$xpath = new DOMXPath($doc);
|
$xpath = new DOMXPath($doc);
|
||||||
$blockquote = $xpath->query('//blockquote[1]')->item(0);
|
$blockquote = $xpath->query('//blockquote[1]')->item(0);
|
||||||
/** @type \DOMElement $blockquote */
|
/** @var \DOMElement $blockquote */
|
||||||
if (strtolower(substr(trim($blockquote->nodeValue), 0, 5)) === 'note:') {
|
if (strtolower(substr(trim($blockquote->nodeValue), 0, 5)) === 'note:') {
|
||||||
$blockquote->setAttribute('class', 'note');
|
$blockquote->setAttribute('class', 'note');
|
||||||
}
|
}
|
||||||
@ -189,7 +189,7 @@ class DocSectionRenderer extends DocRenderer
|
|||||||
$doc->loadHTML($match[0]);
|
$doc->loadHTML($match[0]);
|
||||||
$xpath = new DOMXPath($doc);
|
$xpath = new DOMXPath($doc);
|
||||||
$img = $xpath->query('//img[1]')->item(0);
|
$img = $xpath->query('//img[1]')->item(0);
|
||||||
/** @type \DOMElement $img */
|
/** @var \DOMElement $img */
|
||||||
$img->setAttribute('src', Url::fromPath($img->getAttribute('src'))->getAbsoluteUrl());
|
$img->setAttribute('src', Url::fromPath($img->getAttribute('src'))->getAbsoluteUrl());
|
||||||
return substr_replace($doc->saveXML($img), '', -2, 1); // Replace '/>' with '>'
|
return substr_replace($doc->saveXML($img), '', -2, 1); // Replace '/>' with '>'
|
||||||
}
|
}
|
||||||
@ -206,7 +206,7 @@ class DocSectionRenderer extends DocRenderer
|
|||||||
if (($section = $this->tree->getNode($this->decodeAnchor($match['fragment']))) === null) {
|
if (($section = $this->tree->getNode($this->decodeAnchor($match['fragment']))) === null) {
|
||||||
return $match[0];
|
return $match[0];
|
||||||
}
|
}
|
||||||
/** @type \Icinga\Module\Doc\DocSection $section */
|
/** @var \Icinga\Module\Doc\DocSection $section */
|
||||||
$path = $this->getView()->getHelper('Url')->url(
|
$path = $this->getView()->getHelper('Url')->url(
|
||||||
array_merge(
|
array_merge(
|
||||||
$this->urlParams,
|
$this->urlParams,
|
||||||
@ -219,7 +219,7 @@ class DocSectionRenderer extends DocRenderer
|
|||||||
false
|
false
|
||||||
);
|
);
|
||||||
$url = $this->getView()->url($path);
|
$url = $this->getView()->url($path);
|
||||||
/** @type \Icinga\Web\Url $url */
|
/** @var \Icinga\Web\Url $url */
|
||||||
$url->setAnchor($this->encodeAnchor($section->getId()));
|
$url->setAnchor($this->encodeAnchor($section->getId()));
|
||||||
return sprintf(
|
return sprintf(
|
||||||
'<a %s%shref="%s"',
|
'<a %s%shref="%s"',
|
||||||
|
@ -19,7 +19,7 @@ class DocTocRenderer extends DocRenderer
|
|||||||
/**
|
/**
|
||||||
* Content to render
|
* Content to render
|
||||||
*
|
*
|
||||||
* @type array
|
* @var array
|
||||||
*/
|
*/
|
||||||
protected $content = array();
|
protected $content = array();
|
||||||
|
|
||||||
@ -85,7 +85,7 @@ class DocTocRenderer extends DocRenderer
|
|||||||
false
|
false
|
||||||
);
|
);
|
||||||
$url = $view->url($path);
|
$url = $view->url($path);
|
||||||
/** @type \Icinga\Web\Url $url */
|
/** @var \Icinga\Web\Url $url */
|
||||||
$url->setAnchor($this->encodeAnchor($section->getId()));
|
$url->setAnchor($this->encodeAnchor($section->getId()));
|
||||||
$urlAttributes = array(
|
$urlAttributes = array(
|
||||||
'data-base-target' => '_next',
|
'data-base-target' => '_next',
|
||||||
|
@ -11,14 +11,14 @@ class DocSearch
|
|||||||
/**
|
/**
|
||||||
* Search string
|
* Search string
|
||||||
*
|
*
|
||||||
* @type string
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected $input;
|
protected $input;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Search criteria
|
* Search criteria
|
||||||
*
|
*
|
||||||
* @type array
|
* @var array
|
||||||
*/
|
*/
|
||||||
protected $search;
|
protected $search;
|
||||||
|
|
||||||
|
@ -19,14 +19,14 @@ class DocSearchIterator extends RecursiveFilterIterator
|
|||||||
/**
|
/**
|
||||||
* Search criteria
|
* Search criteria
|
||||||
*
|
*
|
||||||
* @type DocSearch
|
* @var DocSearch
|
||||||
*/
|
*/
|
||||||
protected $search;
|
protected $search;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Current search matches
|
* Current search matches
|
||||||
*
|
*
|
||||||
* @type DocSearchMatch[]|null
|
* @var DocSearchMatch[]|null
|
||||||
*/
|
*/
|
||||||
protected $matches;
|
protected $matches;
|
||||||
|
|
||||||
@ -51,7 +51,7 @@ class DocSearchIterator extends RecursiveFilterIterator
|
|||||||
public function accept()
|
public function accept()
|
||||||
{
|
{
|
||||||
$section = $this->current();
|
$section = $this->current();
|
||||||
/** @type $section \Icinga\Module\Doc\DocSection */
|
/** @var $section \Icinga\Module\Doc\DocSection */
|
||||||
$matches = array();
|
$matches = array();
|
||||||
if (($match = $this->search->search($section->getTitle())) !== null) {
|
if (($match = $this->search->search($section->getTitle())) !== null) {
|
||||||
$matches[] = $match->setMatchType(DocSearchMatch::MATCH_HEADER);
|
$matches[] = $match->setMatchType(DocSearchMatch::MATCH_HEADER);
|
||||||
|
@ -15,56 +15,56 @@ class DocSearchMatch
|
|||||||
/**
|
/**
|
||||||
* CSS class for highlighting matches
|
* CSS class for highlighting matches
|
||||||
*
|
*
|
||||||
* @type string
|
* @var string
|
||||||
*/
|
*/
|
||||||
const HIGHLIGHT_CSS_CLASS = 'search-highlight';
|
const HIGHLIGHT_CSS_CLASS = 'search-highlight';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Header match
|
* Header match
|
||||||
*
|
*
|
||||||
* @type int
|
* @var int
|
||||||
*/
|
*/
|
||||||
const MATCH_HEADER = 1;
|
const MATCH_HEADER = 1;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Content match
|
* Content match
|
||||||
*
|
*
|
||||||
* @type int
|
* @var int
|
||||||
*/
|
*/
|
||||||
const MATCH_CONTENT = 2;
|
const MATCH_CONTENT = 2;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Line
|
* Line
|
||||||
*
|
*
|
||||||
* @type string
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected $line;
|
protected $line;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Line number
|
* Line number
|
||||||
*
|
*
|
||||||
* @type int
|
* @var int
|
||||||
*/
|
*/
|
||||||
protected $lineno;
|
protected $lineno;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Type of the match
|
* Type of the match
|
||||||
*
|
*
|
||||||
* @type int
|
* @var int
|
||||||
*/
|
*/
|
||||||
protected $matchType;
|
protected $matchType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Matches
|
* Matches
|
||||||
*
|
*
|
||||||
* @type array
|
* @var array
|
||||||
*/
|
*/
|
||||||
protected $matches = array();
|
protected $matches = array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* View
|
* View
|
||||||
*
|
*
|
||||||
* @type View|null
|
* @var View|null
|
||||||
*/
|
*/
|
||||||
protected $view;
|
protected $view;
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ class BackendConfigForm extends ConfigForm
|
|||||||
/**
|
/**
|
||||||
* The available monitoring backend resources split by type
|
* The available monitoring backend resources split by type
|
||||||
*
|
*
|
||||||
* @type array
|
* @var array
|
||||||
*/
|
*/
|
||||||
protected $resources;
|
protected $resources;
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/** @type \Icinga\Module\Monitoring\Object\MonitoredObject $object */
|
/** @var \Icinga\Module\Monitoring\Object\MonitoredObject $object */
|
||||||
|
|
||||||
if ($object->getType() === $object::TYPE_HOST) {
|
if ($object->getType() === $object::TYPE_HOST) {
|
||||||
$isService = false;
|
$isService = false;
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<th><?= $this->translate('Comments'); ?></th>
|
<th><?= $this->translate('Comments'); ?></th>
|
||||||
<td>
|
<td>
|
||||||
<?php if ($this->hasPermission('monitoring/command/comment/add')) {
|
<?php if ($this->hasPermission('monitoring/command/comment/add')) {
|
||||||
/** @type \Icinga\Module\Monitoring\Object\MonitoredObject $object */
|
/** @var \Icinga\Module\Monitoring\Object\MonitoredObject $object */
|
||||||
if ($object->getType() === $object::TYPE_HOST) {
|
if ($object->getType() === $object::TYPE_HOST) {
|
||||||
echo $this->qlink(
|
echo $this->qlink(
|
||||||
$this->translate('Add comment'),
|
$this->translate('Add comment'),
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<th><?= $this->translate('Downtimes'); ?></th>
|
<th><?= $this->translate('Downtimes'); ?></th>
|
||||||
<td>
|
<td>
|
||||||
<?php if ($this->hasPermission('monitoring/command/downtime/schedule')) {
|
<?php if ($this->hasPermission('monitoring/command/downtime/schedule')) {
|
||||||
/** @type \Icinga\Module\Monitoring\Object\MonitoredObject $object */
|
/** @var \Icinga\Module\Monitoring\Object\MonitoredObject $object */
|
||||||
if ($object->getType() === $object::TYPE_HOST) {
|
if ($object->getType() === $object::TYPE_HOST) {
|
||||||
echo $this->qlink(
|
echo $this->qlink(
|
||||||
$this->translate('Schedule downtime'),
|
$this->translate('Schedule downtime'),
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Icinga Web 2 | (c) 2013-2015 Icinga Development Team | GPLv2+ */
|
/* Icinga Web 2 | (c) 2013-2015 Icinga Development Team | GPLv2+ */
|
||||||
|
|
||||||
/** @type $this \Icinga\Application\Modules\Module */
|
/** @var $this \Icinga\Application\Modules\Module */
|
||||||
|
|
||||||
$this->providePermission(
|
$this->providePermission(
|
||||||
'monitoring/command/*',
|
'monitoring/command/*',
|
||||||
|
@ -120,7 +120,7 @@ abstract class MonitoredObject implements Filterable
|
|||||||
/**
|
/**
|
||||||
* Filter
|
* Filter
|
||||||
*
|
*
|
||||||
* @type Filter
|
* @var Filter
|
||||||
*/
|
*/
|
||||||
protected $filter;
|
protected $filter;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user