]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
using getContent() in menu system in preparation for supporting non-links
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Thu, 24 Feb 2011 01:49:52 +0000 (01:49 +0000)
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Thu, 24 Feb 2011 01:49:52 +0000 (01:49 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@8457 36083f99-b078-4883-b0ff-0f9b5a30f544

engine/classes/ElggMenuItem.php
mod/profile/views/default/profile/owner_block.php
views/default/navigation/menu/elements/item.php

index 8bff0abba88ac2c758e42a9c22a867a3c4ca2878..58c26aa22a22881ec417ac8547c8e76a1b03a1c1 100644 (file)
@@ -401,13 +401,13 @@ class ElggMenuItem {
        }
 
        /**
-        * Get the menu link
+        * Get the menu item content (usually a link)
         *
-        * @params array $vars Options to pass to output/url
+        * @params array $vars Options to pass to output/url if a link
         *
         * @return string
         */
-       public function getLink(array $vars = array()) {
+       public function getContent(array $vars = array()) {
                $vars['text'] = $this->text;
                if ($this->href) {
                        $vars['href'] = $this->href;
index d257f03a82853a25ea95c6804bc0f31265725369..20555d26012344f2a9f472095845374f5bb0d24e 100755 (executable)
@@ -28,7 +28,7 @@ $profile_actions = '';
 if (elgg_is_logged_in() && $actions) {
        $profile_actions = '<ul class="elgg-menu">';
        foreach ($actions as $action) {
-               $profile_actions .= '<li>' . $action->getLink(array('class' => 'elgg-button elgg-button-action')) . '</li>';
+               $profile_actions .= '<li>' . $action->getContent(array('class' => 'elgg-button elgg-button-action')) . '</li>';
        }
        $profile_actions .= '</ul>';
 }
index 7b07c9485c553a5c9c82c2c53bff517b95544376..d1d721c63081057d41dd5245020d119f5ef2e5bc 100644 (file)
@@ -26,7 +26,7 @@ if ($item_class) {
 }
 
 echo "<li $class>";
-echo $item->getLink($link_vars);
+echo $item->getContent($link_vars);
 if ($children) {
        echo elgg_view('navigation/menu/elements/group', array(
                'items' => $children,