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

class Inspira_Widget_LandingPageVideosController extends Engine_Content_Widget_Abstract {

  public function indexAction() {
		$this->view->allParams = $this->_getAllParams();
    $this->view->paginator = Engine_Api::_()->getDbTable('videos', 'video')->getVideosPaginator(array('search' => true, 'orderby' => $this->_getParam('popularType', 'view').'_count', 'limit' => 4));

    if( $this->view->paginator->getTotalItemCount() <= 0 )
      return $this->setNoRender();
  }
}
