original_string: public function afterPaginate(Event $event)
      {
          $event;
          if (!$this->_table()->behaviors()->has('Search')) {
              return;
          }
  
          $enabled = $this->getConfig('enabled') ?: !$this->_request()->is('api');
          if (!$enabled) {
              return;
          }
  
          $fields = $this->fields();
          $this->_controller()->set('searchInputs', $fields);
      }
code: public function afterPaginate(Event $event)
      {
          $event;
          if (!$this->_table()->behaviors()->has('Search')) {
              return;
          }
  
          $enabled = $this->getConfig('enabled') ?: !$this->_request()->is('api');
          if (!$enabled) {
              return;
          }
  
          $fields = $this->fields();
          $this->_controller()->set('searchInputs', $fields);
      }
code_tokens: public function afterPaginate ( Event $ event ) { $ event ; if ( ! $ this -> _table ( ) -> behaviors ( ) -> has ( 'Search' ) ) { return ; } $ enabled = $ this -> getConfig ( 'enabled' ) ? : ! $ this -> _request ( ) -> is ( 'api' ) ; if ( ! $ enabled ) { return ; } $ fields = $ this -> fields ( ) ; $ this -> _controller ( ) -> set ( 'searchInputs' , $ fields ) ; }
docstring: After paginate event callback.
  
  Only after a crud paginate call does this listener do anything. So listen
  for that
  
  @param \Cake\Event\Event $event Event.
  @return void
docstring_tokens: After paginate event callback .