summaryrefslogtreecommitdiff
path: root/includes/view/UserHintsRenderer.php
diff options
context:
space:
mode:
authorBot <bot@myigel.name>2017-01-02 15:43:36 +0100
committerIgor Scheller <igor.scheller@igorshp.de>2017-01-02 15:49:53 +0100
commitd71e7bbfad2f07f82df0c515608996d250fd4182 (patch)
tree5083a17b218c08b3a699a0bf15bec926cc2dd185 /includes/view/UserHintsRenderer.php
parent7313e15ce8236e19331fb6639a3a5b97c8f06ecd (diff)
Formatting
Diffstat (limited to 'includes/view/UserHintsRenderer.php')
-rw-r--r--includes/view/UserHintsRenderer.php100
1 files changed, 50 insertions, 50 deletions
diff --git a/includes/view/UserHintsRenderer.php b/includes/view/UserHintsRenderer.php
index 30281ea0..cd0f568a 100644
--- a/includes/view/UserHintsRenderer.php
+++ b/includes/view/UserHintsRenderer.php
@@ -8,54 +8,54 @@ class UserHintsRenderer
private $important = false;
- /**
- * Render the added hints to a popover for the toolbar.
- */
- public function render()
- {
- if (count($this->hints) > 0) {
- $hint_class = $this->important ? 'danger' : 'info';
- $glyphicon = $this->important ? 'warning-sign' : 'info-sign';
-
- return toolbar_popover($glyphicon . ' text-' . $hint_class, '', $this->hints, 'bg-' . $hint_class);
- }
-
- return '';
- }
-
- /**
- * Add a hint to the list, if its not null and a not empty string.
- *
- * @param string $hint
- * The hint
- * @param boolean $important
- * Is the hint important?
- */
- public function addHint($hint, $important = false)
- {
- if ($hint != null && $hint != '') {
- if ($important) {
- $this->important = true;
- $this->hints[] = error($hint, true);
- } else {
- $this->hints[] = info($hint, true);
- }
- }
- }
-
- /**
- * Get all hints.
- */
- public function getHints()
- {
- return $this->hints;
- }
-
- /**
- * Are there important hints? This leads to a more intensive icon.
- */
- public function isImportant()
- {
- return $this->important;
- }
+ /**
+ * Render the added hints to a popover for the toolbar.
+ */
+ public function render()
+ {
+ if (count($this->hints) > 0) {
+ $hint_class = $this->important ? 'danger' : 'info';
+ $glyphicon = $this->important ? 'warning-sign' : 'info-sign';
+
+ return toolbar_popover($glyphicon . ' text-' . $hint_class, '', $this->hints, 'bg-' . $hint_class);
+ }
+
+ return '';
+ }
+
+ /**
+ * Add a hint to the list, if its not null and a not empty string.
+ *
+ * @param string $hint
+ * The hint
+ * @param boolean $important
+ * Is the hint important?
+ */
+ public function addHint($hint, $important = false)
+ {
+ if ($hint != null && $hint != '') {
+ if ($important) {
+ $this->important = true;
+ $this->hints[] = error($hint, true);
+ } else {
+ $this->hints[] = info($hint, true);
+ }
+ }
+ }
+
+ /**
+ * Get all hints.
+ */
+ public function getHints()
+ {
+ return $this->hints;
+ }
+
+ /**
+ * Are there important hints? This leads to a more intensive icon.
+ */
+ public function isImportant()
+ {
+ return $this->important;
+ }
}