<?php
/**
  * Ahead WebSoft Technologies Pvt Ltd.
  * @copyright  Copyright 2006-2026 Ahead WebSoft Technologies Pvt Ltd.
  * @license    https://www.socialengine.com/policies
*/

class Fbclone_Widget_DashboardLinksController extends Engine_Content_Widget_Abstract {

  public function indexAction() {

    $this->view->viewer = $viewer = Engine_Api::_()->user()->getViewer();
    $this->view->viewer_id = $viewerId = $viewer->getIdentity();
    if(empty($viewerId))
      return $this->setNoRender();

    $this->view->homelinksnavigation = Engine_Api::_()->getApi('menus', 'core')->getNavigation('user_home');
		$fbclone_widget = Zend_Registry::isRegistered('fbclone_widget') ? Zend_Registry::get('fbclone_widget') : null;
    $this->view->dashboardlinks = Engine_Api::_()->getDbTable('dashboardlinks', 'fbclone')->getInfo(array('sublink' => 0, 'enabled' => 1));
		if(empty($fbclone_widget))
			return $this->setNoRender();
  }
}
