Created
September 30, 2011 18:43
-
-
Save dragoonis/1254618 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Override | |
* | |
* @param string $template | |
* @param array $params | |
* @param array $options | |
* @return void | |
*/ | |
function render($template, array $params = array(), array $options = array()) { | |
// --- View Helper Assignment --- | |
$params['helper'] = $this->_viewHelper; | |
$params['siteOptions'] = $this->_siteOptions; | |
$params['fbAppID'] = $this->getConfig()->fb->appID; | |
if(!isset($params['isAjax']) && !$this->is('ajax')) { | |
if($this->isLoggedIn()) { | |
// Avatar work | |
$session = $this->getSession(); | |
$authInfo = $session->getAuthData(); | |
$checked = $session->get('checked_custom_avatar', false); | |
if(!$checked && !isset($authInfo['has_custom_avatar'])) { | |
$userInfoModel = new APP_Model_User_Info(); | |
$authInfo += $userInfoModel->getUserInfo($authInfo['id'], array('has_custom_avatar', 'avatar_thumbnail')); | |
if(isset($authInfo['avatar_thumbnail'])) { | |
$authInfo['avatar_thumbnail'] = unserialize($authInfo['avatar_thumbnail']); | |
} | |
$session->set('checked_custom_avatar', true); | |
$session->setAuthData($authInfo); | |
} | |
} | |
$catModel = new APP_Model_CategoryNew(); | |
$params['shopMenuDropdownItems'] = $catModel->getShopMenuDropdownItems(); | |
/* | |
// ---- Main Menu Items ---- | |
$params['menubar'] = parent::render('elements/mainmenu', array( | |
'menuItems' => $this->getMainMenu(), | |
'helper' => $params['helper'], | |
'fbAppID' => $params['fbAppID'] | |
), array( | |
'cache' => true, | |
'cacheHandler' => new PPI_Cache_Disk(), | |
'partial' => true | |
)); | |
*/ | |
} | |
parent::render($template, $params, $options); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment