code: protected function _prepareDataProvider()
      {
          if (!is_null($this->limit)) {
              $this->dataProvider->pagination->pageSize = $this->limit;
          } else {
              $this->dataProvider->pagination->pageSize = $this->itemsPerRequest;
          }
      }
docs: [[@doctodo method_description:_prepareDataProvider]].