summaryrefslogtreecommitdiffstats
path: root/library/Icingadb/Common/NoSubjectLink.php
diff options
context:
space:
mode:
Diffstat (limited to 'library/Icingadb/Common/NoSubjectLink.php')
-rw-r--r--library/Icingadb/Common/NoSubjectLink.php35
1 files changed, 35 insertions, 0 deletions
diff --git a/library/Icingadb/Common/NoSubjectLink.php b/library/Icingadb/Common/NoSubjectLink.php
new file mode 100644
index 0000000..76c9a84
--- /dev/null
+++ b/library/Icingadb/Common/NoSubjectLink.php
@@ -0,0 +1,35 @@
+<?php
+
+/* Icinga DB Web | (c) 2021 Icinga GmbH | GPLv2 */
+
+namespace Icinga\Module\Icingadb\Common;
+
+trait NoSubjectLink
+{
+ /** @var bool */
+ protected $noSubjectLink = false;
+
+ /**
+ * Set whether a list item's subject should be a link
+ *
+ * @param bool $state
+ *
+ * @return $this
+ */
+ public function setNoSubjectLink(bool $state = true): self
+ {
+ $this->noSubjectLink = $state;
+
+ return $this;
+ }
+
+ /**
+ * Get whether a list item's subject should be a link
+ *
+ * @return bool
+ */
+ public function getNoSubjectLink(): bool
+ {
+ return $this->noSubjectLink;
+ }
+}