mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-26 23:34:08 +02:00
CS: Fix docstrings in Icinga/Web/Widget/* and Icinga/Web/Controller/ActionController.php
refs #4512
This commit is contained in:
parent
aff2398c81
commit
7dc2f78b63
@ -25,6 +25,7 @@
|
||||
* @author Icinga Development Team <info@icinga.org>
|
||||
*/
|
||||
// {{{ICINGA_LICENSE_HEADER}}}
|
||||
|
||||
namespace Icinga\Web\Controller;
|
||||
|
||||
use \Icinga\Authentication\Manager as AuthManager;
|
||||
@ -50,7 +51,6 @@ use \Zend_Controller_Action_HelperBroker as ZfActionHelper;
|
||||
*/
|
||||
class ActionController extends ZfController
|
||||
{
|
||||
|
||||
/**
|
||||
* True to mark this layout to not render the full layout
|
||||
*
|
||||
@ -67,7 +67,7 @@ class ActionController extends ZfController
|
||||
protected $handlesAuthentication = false;
|
||||
|
||||
/**
|
||||
* Set true when this controller modifies the session.
|
||||
* Set true when this controller modifies the session
|
||||
*
|
||||
* otherwise the session will be written back to disk and closed before the controller
|
||||
* action is executed, leading to every modification in the session to be lost after
|
||||
@ -81,7 +81,7 @@ class ActionController extends ZfController
|
||||
* True if authentication suceeded, otherwise false
|
||||
*
|
||||
* @var bool
|
||||
**/
|
||||
*/
|
||||
protected $allowAccess = false;
|
||||
|
||||
|
||||
@ -107,8 +107,6 @@ class ActionController extends ZfController
|
||||
*/
|
||||
protected $action_name;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* The constructor starts benchmarking, loads the configuration and sets
|
||||
* other useful controller properties
|
||||
@ -148,10 +146,10 @@ class ActionController extends ZfController
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the @see \Icinga\Widget\Web\Tabs of this view
|
||||
* Return the tabs
|
||||
*
|
||||
* @return Tabs
|
||||
**/
|
||||
* @return \Icinga\Widget\Web\Tabs
|
||||
*/
|
||||
public function getTabs()
|
||||
{
|
||||
return $this->view->tabs;
|
||||
|
@ -39,7 +39,11 @@ use \Icinga\Web\Url;
|
||||
class BasketAction implements Tabextension
|
||||
{
|
||||
/**
|
||||
* @see Tabextension::apply()
|
||||
* Applies the dashboard actions to the provided tabset
|
||||
*
|
||||
* @param Tabs $tabs The tabs object to extend with
|
||||
*
|
||||
* @see \Icinga\Web\Widget\Tabextension::apply()
|
||||
*/
|
||||
public function apply(Tabs $tabs)
|
||||
{
|
||||
|
@ -43,8 +43,9 @@ class DashboardAction implements Tabextension
|
||||
/**
|
||||
* Applies the dashboard actions to the provided tabset
|
||||
*
|
||||
* @param Tabs The tabs object to extend with
|
||||
* @see Tabextension::apply()
|
||||
* @param Tabs $tabs The tabs object to extend with
|
||||
*
|
||||
* @see \Icinga\Web\Widget\Tabextension::apply()
|
||||
*/
|
||||
public function apply(Tabs $tabs)
|
||||
{
|
||||
|
@ -28,15 +28,13 @@
|
||||
|
||||
namespace Icinga\Web\Widget\Tabextension;
|
||||
|
||||
use Icinga\Application\Logger;
|
||||
use Icinga\Web\Widget\Tab;
|
||||
use Icinga\Web\Widget\Tabs;
|
||||
use Icinga\Web\Url;
|
||||
use \Icinga\Application\Logger;
|
||||
use \Icinga\Web\Widget\Tab;
|
||||
use \Icinga\Web\Widget\Tabs;
|
||||
use \Icinga\Web\Url;
|
||||
|
||||
/**
|
||||
* Tabextension that offers different output formats for the user in the dropdown area
|
||||
*
|
||||
*
|
||||
*/
|
||||
class OutputFormat implements Tabextension
|
||||
{
|
||||
@ -119,7 +117,7 @@ class OutputFormat implements Tabextension
|
||||
/**
|
||||
* Applies the format selectio to the provided tabset
|
||||
*
|
||||
* @param Tabs The tabs object to extend with
|
||||
* @param Tabs $tabs The tabs object to extend with
|
||||
*
|
||||
* @see Tabextension::apply()
|
||||
*/
|
||||
|
@ -31,19 +31,20 @@ namespace Icinga\Web\Widget\Tabextension;
|
||||
use \Icinga\Web\Widget\Tabs;
|
||||
|
||||
/**
|
||||
* Tabextension interface that allows to extend a tabbar with reusable components.
|
||||
* Tabextension interface that allows to extend a tabbar with reusable components
|
||||
*
|
||||
* Tabs can be either extended by creating a tabextension and calling the apply method
|
||||
* or by calling the tabs @see \Icinga\Web\Widget\Tabs::extend() method and providing
|
||||
* a tab extension.
|
||||
* Tabs can be either extended by creating a `Tabextension` and calling the `apply()` method
|
||||
* or by calling the `\Icinga\Web\Widget\Tabs` `extend()` method and providing
|
||||
* a tab extension
|
||||
*
|
||||
**/
|
||||
* @see \Icinga\Web\Widget\Tabs::extend()
|
||||
*/
|
||||
interface Tabextension
|
||||
{
|
||||
/**
|
||||
* Apply this tabextension to the provided tabs
|
||||
*
|
||||
* @param Tabs $tabs The tabbar to modify
|
||||
**/
|
||||
*/
|
||||
public function apply(Tabs $tabs);
|
||||
}
|
||||
|
@ -31,12 +31,10 @@ namespace Icinga\Web\Widget;
|
||||
use \Icinga\Exception\ProgrammingError;
|
||||
use \Icinga\Web\Widget\Tabextension\Tabextension;
|
||||
use \Zend_View_Abstract;
|
||||
|
||||
use \Countable;
|
||||
|
||||
/**
|
||||
* Navigation tab widget
|
||||
*
|
||||
*/
|
||||
class Tabs implements Countable, Widget
|
||||
{
|
||||
@ -59,7 +57,9 @@ EOT;
|
||||
*/
|
||||
private $dropdownTpl = <<< 'EOT'
|
||||
<li class="dropdown pull-right ">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="icon-list-ul"> </i></a>
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
||||
<i class="icon-list-ul"></i>
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
{TABS}
|
||||
</ul>
|
||||
@ -95,9 +95,10 @@ EOT;
|
||||
*
|
||||
* @param string $name Name of the tab going to be activated
|
||||
*
|
||||
* @throws ProgrammingError if given tab name doesn't exist
|
||||
*
|
||||
* @return self
|
||||
*
|
||||
* @throws ProgrammingError When the given tab name doesn't exist
|
||||
*
|
||||
*/
|
||||
public function activate($name)
|
||||
{
|
||||
@ -151,9 +152,9 @@ EOT;
|
||||
*
|
||||
* @param string $name The tab you're interested in
|
||||
*
|
||||
* @throws ProgrammingError if given tab name doesn't exist
|
||||
*
|
||||
* @return Tab
|
||||
*
|
||||
* @throws ProgrammingError When the given tab name doesn't exist
|
||||
*/
|
||||
public function get($name)
|
||||
{
|
||||
@ -170,11 +171,11 @@ EOT;
|
||||
* with tab properties or an instance of an existing Tab
|
||||
*
|
||||
* @param string $name The new tab name
|
||||
* @param array|Tab The tab itself of it's properties
|
||||
*
|
||||
* @throws ProgrammingError if tab name already exists
|
||||
* @param array|Tab $tab The tab itself of it's properties
|
||||
*
|
||||
* @return self
|
||||
*
|
||||
* @throws ProgrammingError When the tab name already exists
|
||||
*/
|
||||
public function add($name, $tab)
|
||||
{
|
||||
@ -197,7 +198,7 @@ EOT;
|
||||
* of an existing Tab
|
||||
*
|
||||
* @param string $name The new tab name
|
||||
* @param array|Tab The tab itself of it's properties
|
||||
* @param array|Tab $tab The tab itself of it's properties
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
@ -244,7 +245,7 @@ EOT;
|
||||
}
|
||||
$tabs .= $tab->render($view);
|
||||
}
|
||||
return str_replace("{TABS}", $tabs, $this->dropdownTpl);
|
||||
return str_replace('{TABS}', $tabs, $this->dropdownTpl);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -268,6 +269,8 @@ EOT;
|
||||
}
|
||||
|
||||
/**
|
||||
* Render to HTML
|
||||
*
|
||||
* @see Widget::render
|
||||
*/
|
||||
public function render(Zend_View_Abstract $view)
|
||||
@ -277,17 +280,17 @@ EOT;
|
||||
}
|
||||
|
||||
$html = $this->baseTpl;
|
||||
$html = str_replace("{TABS}", $this->renderTabs($view), $html);
|
||||
$html = str_replace("{DROPDOWN}", $this->renderDropdownTabs($view), $html);
|
||||
$html = str_replace('{TABS}', $this->renderTabs($view), $html);
|
||||
$html = str_replace('{DROPDOWN}', $this->renderDropdownTabs($view), $html);
|
||||
return $html;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the number of tabs
|
||||
*
|
||||
* @see Countable
|
||||
*
|
||||
* @return int
|
||||
*
|
||||
* @see Countable
|
||||
*/
|
||||
public function count()
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user