Disable grid pagination.

@return $this
336749
public function disablePagination(bool $disable = true)
    {
        $this->model->usePaginate(!$disable);

        return $this->option('show_pagination', !$disable);
    }
592710
protected function _isPaginationEnabled()
    {
        if (!isset($this->controller->limits) ||
            !isset($this->controller->limits[$this->action]) ||
            !isset($this->controller->limits[$this->action]['default']) ||
            !isset($this->controller->limits[$this->action]['limits'])
        ) {
            return false;
        }

        return true;
    }
741273
public function disableGridElements($param)
  {
    if ($param) {
      add_action('admin_menu', function () {
        remove_menu_page('edit.php?post_type=vc_grid_item');
        remove_menu_page('vc-welcome');
      });

      add_action('admin_bar_menu', function ($wp_admin_bar) {
        $wp_admin_bar->remove_node('new-vc_grid_item');
      }, 999);
    }
  }
1069150
protected function throttle()
    {
        if ($this->isThrottled($this->conn, 'onOpen')) {
            $this->console->info(sprintf('Connection throttled: %d', $this->conn->resourceId));
            $this->conn->send(trans('ratchet::messages.tooManyConnectionAttempts'));
            $this->throttled = true;
            $this->conn->close();
        }

        return $this;
    }
1319022
protected function setPaginate()
    {
        $paginate = $this->findQueryByMethod('paginate');

        $this->queries = $this->queries->reject(function ($query) {
            return $query['method'] == 'paginate';
        });

        if (!$this->usePaginate) {
            $query = [
                'method'    => 'get',
                'arguments' => [],
            ];
        } else {
            $query = [
                'method'    => 'paginate',
                'arguments' => $this->resolvePerPage($paginate),
            ];
        }

        $this->queries->push($query);
    }
548981
public function negatable() {
        $this->validated = false;
        $this->config[self::NEGATABLE] = true;
        return $this;
    }
791723
public function removeProcessed()
    {
        if ( $this->hasAttribute( 'action' ) )
        {
            unset( $this->attributes['action'] );
        }

        if ( $this->getBlockCount() > 0 )
        {
            foreach ( $this->attributes['blocks'] as $index => $block )
            {
                if ( $block->toBeRemoved() )
                {
                    $this->removeBlock( $index );
                }
                else
                {
                    $block->removeProcessed();
                }
            }
        }

        return $this;
    }
352616
public function clearRows()
    {
        $this->downloader->clearRows();
        $this->outputter->clearRows();
        $this->writer->clearRows();

        return $this;
    }
1147915
public function removePageSessionPluginAction()
    {
        $module = $this->getRequest()->getQuery('module', null);
        $pluginName = $this->getRequest()->getQuery('pluginName', '');
        $pageId = $this->getRequest()->getQuery('pageId', null);
        $pluginId = $this->getRequest()->getQuery('pluginId', null);
        $pluginTag = $this->getRequest()->getQuery('pluginTag', null);
        
        $parameters = array(
            'module' => $module,
            'pluginName' => $pluginName,
            'pageId' => $pageId,
            'pluginId' => $pluginId,
            'pluginTag' => $pluginTag,
        );
        
        $translator = $this->serviceLocator->get('translator');

        if (empty($module) || empty($pluginName) || empty($pageId) || empty($pluginId))
        {

            $result = array(
                'success' => 0,
                'errors' => array(array('empty' => $translator->translate('tr_meliscms_form_common_errors_Empty datas')))
            );
        }
        else
        {

            $this->getEventManager()->trigger('meliscms_page_removesession_plugin_start', null, $parameters);
            
            // removing plugin from session
            $container = new Container('meliscms');
            if (!empty($container['content-pages'][$pageId][$pluginTag][$pluginId]))
                unset($container['content-pages'][$pageId][$pluginTag][$pluginId]);
            
            $this->getEventManager()->trigger('meliscms_page_removesession_plugin_end', null, $parameters);
            
            $result = array(
                'success' => 1,
                'errors' => array()
            );
        }
         
        return new JsonModel($result);
    }
1076907
public function paginator()
    {
        $paginator = $this->paginate();

        if (!is_null($this->presenter)) {
            return (new $this->presenter($paginator))->render();
        }

        return $paginator->render();
    }
657330
public function reset()
    {
        $this->pathRegistered = false;

        if ($this->renderer instanceof PhpRenderer) {
            $this->renderer->reset();
        }

        $this->renderer->setPaths(new PriorityQueue());

        return $this;
    }
560751
public function paginate(array $params)
    {

        // page
        if (isset($params[$this->getParamPage()])) {
            $this->setPage($params[$this->getParamPage()]);
        }

        return $this;
    }
194083
public function disable() {

        global $wp_filesystem;

        $plugin = $GLOBALS[ 'redisObjectCache' ];

        if ( ! $plugin->object_cache_dropin_exists() ) {

            WP_CLI::error( __( 'No object cache drop-in found.', 'redis-cache' ) );

        } else {

            if ( ! $plugin->validate_object_cache_dropin() ) {

                WP_CLI::error( __( 'An unknown object cache drop-in was found. To use Redis run: wp redis update-dropin.', 'redis-cache' ) );

            } else {

                WP_Filesystem();

                if ( $wp_filesystem->delete( WP_CONTENT_DIR . '/object-cache.php' ) ) {
                    WP_CLI::success( __( 'Object cache disabled.', 'redis-cache' ) );
                } else {
                    WP_CLI::error( __( 'Object cache could not be disabled.', 'redis-cache' ) );
                }

            }

        }

    }
1371125
public function render()
    {
        if (!$this->grid->showPagination()) {
            return '';
        }

        return $this->paginationRanger().
            $this->paginationLinks().
            $this->perPageSelector();
    }
9416
public function clear()
    {
        $this->aCss            = [];
        $this->aCssInline      = [];
        $this->aJs             = [];
        $this->aJsInlineHeader = [];
        $this->aJsInlineFooter = [];
        return $this;
    }
402778
protected function resetStateBeforeIndexAction()
    {
        $this->activeSort           = null;
        $this->activeSortDescending = null;
        $this->activeScope          = null;
        $this->filters              = [];
        $this->activePage           = null;
        $this->activePageSize       = null;
        $this->resetActivePage      = false;

        return $this;
    }
384514
public function pagination() {
		global $post, $page, $numpages, $multipage;
		$post = $this;
		$ret = array();
		if ( $multipage ) {
			for ( $i = 1; $i <= $numpages; $i++ ) {
				$link = self::get_wp_link_page($i);
				$data = array('name' => $i, 'title' => $i, 'text' => $i, 'link' => $link);
				if ( $i == $page ) {
					$data['current'] = true;
				}
				$ret['pages'][] = $data;
			}
			$i = $page - 1;
			if ( $i ) {
				$link = self::get_wp_link_page($i);
				$ret['prev'] = array('link' => $link);
			}
			$i = $page + 1;
			if ( $i <= $numpages ) {
				$link = self::get_wp_link_page($i);
				$ret['next'] = array('link' => $link);
			}
		}
		return $ret;
	}