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

  public function indexAction() {
		$this->view->allParams = $this->_getAllParams();
    $this->view->paginator = $paginator = Engine_Api::_()->getdbTable('groups', 'group')->getGroupPaginator(array('search' => true, 'order' => $this->_getParam('popularType', 'view').'_count', 'limit' => 3));
    $paginator->setItemCountPerPage(3);
    if( $paginator->getTotalItemCount() <= 0 )
      return $this->setNoRender();
  } 
}
