diff --git a/configuration.php b/configuration.php index 9df69a9..bf3cfc5 100644 --- a/configuration.php +++ b/configuration.php @@ -3,9 +3,6 @@ /** @var \Icinga\Application\Modules\Module $this */ -use Icinga\Module\Toplevelview\ViewConfig; -use Icinga\Web\Url; - $this->providePermission('toplevelview/edit', $this->translate('Allow the user to edit Top Level Views')); $this->provideRestriction( diff --git a/library/Toplevelview/Model/View.php b/library/Toplevelview/Model/View.php index ea30bcd..bb3d90b 100644 --- a/library/Toplevelview/Model/View.php +++ b/library/Toplevelview/Model/View.php @@ -9,7 +9,8 @@ use Icinga\Module\Toplevelview\Tree\TLVTree; /** - * View represents a single Top Level View + * View represents a single Top Level View. + * It contains the actual Tree and metadata. */ class View { diff --git a/library/Toplevelview/Tree/TLVIcingaNode.php b/library/Toplevelview/Tree/TLVIcingaNode.php index 5dab18d..1ca2fb7 100644 --- a/library/Toplevelview/Tree/TLVIcingaNode.php +++ b/library/Toplevelview/Tree/TLVIcingaNode.php @@ -6,6 +6,7 @@ use Icinga\Exception\NotImplementedError; /** + * Leaf nodes that fetch data from the database are TLVIcingaNodes. * @codeCoverageIgnore */ class TLVIcingaNode extends TLVTreeNode diff --git a/library/Toplevelview/Tree/TLVTreeNode.php b/library/Toplevelview/Tree/TLVTreeNode.php index 9cfd3b9..395bfee 100644 --- a/library/Toplevelview/Tree/TLVTreeNode.php +++ b/library/Toplevelview/Tree/TLVTreeNode.php @@ -21,6 +21,9 @@ class TLVTreeNode extends TreeNode */ protected $type = 'node'; + /** + * @var string + */ protected $key = null; /** @@ -48,6 +51,11 @@ class TLVTreeNode extends TreeNode */ protected $properties = array(); + /** + * Determine if this node is a leaf + * + * @var bool + */ protected static $canHaveChildren = true; /** diff --git a/library/Toplevelview/Util/Str.php b/library/Toplevelview/Util/Str.php index 0f37186..ce93041 100644 --- a/library/Toplevelview/Util/Str.php +++ b/library/Toplevelview/Util/Str.php @@ -2,10 +2,14 @@ namespace Icinga\Module\Toplevelview\Util; +/** + * Str is a small helper class for working with strings + */ class Str { /** * Str::limit method truncates the given string to the specified length. + * Used in cases where CSS text-overflow cannot be used. * * @param string $str * @param int $len