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

class Inspira_Widget_LandingPageEventsController extends Engine_Content_Widget_Abstract {

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