Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 295555

Remove public visibility from pager variables on the ViewExecutable

$
0
0

Problem/Motivation

The ViewExecutable class still has a lot of public properties, let's remove some of them, which aren't actually needed:

  /**
   * The current page. If the view uses pagination.
   *
   * @var int
   */
  public $current_page = NULL;
  /**
   * The number of items per page.
   *
   * @var int
   */
  public $items_per_page = NULL;
  /**
   * The pager offset.
   *
   * @var int
   */
  public $offset = NULL;
  public function setCurrentPage($page) {}
  public function getCurrentPage($page) {}
  public function getItemsPerPage($page) {}
  public function setItemsPerPage($page) {}
  public function getOffset($page) {}
  public function setOffset($page) {}

Proposed resolution

Replace public with protected and search for all usages of those and replace it with the appropriate method call.

Remaining tasks

User interface changes

API changes


Viewing all articles
Browse latest Browse all 295555


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>