aboutsummaryrefslogtreecommitdiff
path: root/engine/classes
diff options
context:
space:
mode:
Diffstat (limited to 'engine/classes')
-rw-r--r--engine/classes/ElggWidget.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/engine/classes/ElggWidget.php b/engine/classes/ElggWidget.php
index 1622aa5b3..15e942aa3 100644
--- a/engine/classes/ElggWidget.php
+++ b/engine/classes/ElggWidget.php
@@ -102,6 +102,21 @@ class ElggWidget extends ElggObject {
}
/**
+ * Get the title of the widget
+ *
+ * @return string
+ * @since 1.8.0
+ */
+ public function getTitle() {
+ $title = $this->title;
+ if (!$title) {
+ global $CONFIG;
+ $title = $CONFIG->widgets->handlers[$this->handler]->name;
+ }
+ return $title;
+ }
+
+ /**
* Move the widget
*
* @param int $column The widget column