aboutsummaryrefslogtreecommitdiff
path: root/engine/classes
diff options
context:
space:
mode:
Diffstat (limited to 'engine/classes')
-rw-r--r--engine/classes/ElggEntity.php4
-rw-r--r--engine/classes/ElggMenuItem.php38
2 files changed, 33 insertions, 9 deletions
diff --git a/engine/classes/ElggEntity.php b/engine/classes/ElggEntity.php
index 8fc1e46cb..6edc99dd4 100644
--- a/engine/classes/ElggEntity.php
+++ b/engine/classes/ElggEntity.php
@@ -851,7 +851,7 @@ abstract class ElggEntity extends ElggData implements
*/
function countComments() {
$params = array('entity' => $this);
- $num = trigger_plugin_hook('comments:count', $this->getType(), $params);
+ $num = elgg_trigger_plugin_hook('comments:count', $this->getType(), $params);
if (is_int($num)) {
return $num;
@@ -1628,7 +1628,7 @@ abstract class ElggEntity extends ElggData implements
*/
elgg_set_viewtype('default');
- $view = elgg_view_entity($this, true);
+ $view = elgg_view_entity($this, array('full_view' => true));
elgg_set_viewtype();
$tmp[] = new ODDMetaData($uuid . "volatile/renderedentity/", $uuid,
diff --git a/engine/classes/ElggMenuItem.php b/engine/classes/ElggMenuItem.php
index 157ed9ceb..1181583f2 100644
--- a/engine/classes/ElggMenuItem.php
+++ b/engine/classes/ElggMenuItem.php
@@ -132,7 +132,7 @@ class ElggMenuItem {
$item->setItemClass($options['item_class']);
unset($options['item_class']);
}
-
+
foreach ($options as $key => $value) {
$item->$key = $value;
}
@@ -153,9 +153,20 @@ class ElggMenuItem {
public function getName() {
return $this->name;
}
+
+ /**
+ * Set the display text of the menu item
+ *
+ * @param string $text The display text
+ *
+ * @return void
+ */
+ public function setText($text) {
+ $this->text = $text;
+ }
/**
- * Get the display text of the menu
+ * Get the display text of the menu item
*
* @return string
*/
@@ -164,6 +175,15 @@ class ElggMenuItem {
}
/**
+ * Set the URL of the menu item
+ *
+ * @return void
+ */
+ public function setHref($href) {
+ $this->href = $href;
+ }
+
+ /**
* Get the URL of the menu item
*
* @return string
@@ -465,7 +485,7 @@ class ElggMenuItem {
* @params array $vars Options to pass to output/url if a link
*
* @return string
- *
+ *
* @todo View code in a model. How do we feel about that?
*/
public function getContent(array $vars = array()) {
@@ -475,7 +495,7 @@ class ElggMenuItem {
}
$vars['text'] = $this->text;
-
+
if ($this->href) {
$vars['href'] = $this->href;
}
@@ -483,15 +503,19 @@ class ElggMenuItem {
if ($this->linkClass) {
$vars['class'] = $this->getLinkClass();
}
-
+
+ if ($this->link_rel) {
+ $vars['rel'] = $this->link_rel;
+ }
+
if ($this->rel) {
$vars['rel'] = $this->rel;
}
-
+
if ($this->title) {
$vars['title'] = $this->title;
}
-
+
if ($this->is_action) {
$vars['is_action'] = $this->is_action;
}