Example #1
0
 protected function setUp()
 {
     $this->pager = $this->getMockBuilder('Drupal\\views\\Plugin\\views\\pager\\PagerPluginBase')->disableOriginalConstructor()->getMockForAbstractClass();
     $view = $this->getMockBuilder('Drupal\\views\\ViewExecutable')->disableOriginalConstructor()->getMock();
     $display = $this->getMockBuilder('Drupal\\views\\Plugin\\views\\display\\DisplayPluginBase')->disableOriginalConstructor()->getMock();
     $options = array('items_per_page' => 5, 'offset' => 1);
     $this->pager->init($view, $display, $options);
     $this->pager->current_page = 1;
 }
Example #2
0
 /**
  * {@inheritdoc}
  */
 public function init(ViewExecutable $view, DisplayPluginBase $display, array &$options = NULL)
 {
     parent::init($view, $display, $options);
     // If the pager is set to none, then it should show all items.
     $this->setItemsPerPage(0);
 }
Example #3
0
 /**
  * {@inheritdoc}
  */
 public function init(ViewExecutable $view, DisplayPluginBase $display, array &$options = NULL)
 {
     parent::init($view, $display, $options);
     $this->argument = CalendarHelper::getDateArgumentHandler($this->view);
 }