original_string: protected function getItems(GridField $gridField)
      {
          $gridField->getConfig()->removeComponentsByType('GridFieldPaginator');
  
          $items = $gridField->getManipulatedList();
  
          foreach ($gridField->getConfig()->getComponents() as $component) {
              if ($component instanceof GridFieldFilterHeader || $component instanceof GridFieldSortableHeader) {
                  $items = $component->getManipulatedData($gridField, $items);
              }
          }
  
          $arrayList = new ArrayList();
  
          foreach ($items->limit(null) as $item) {
              if (!$item->hasMethod('canView') || $item->canView()) {
                  $arrayList->add($item);
              }
          }
  
          return $arrayList;
      }
code: protected function getItems(GridField $gridField)
      {
          $gridField->getConfig()->removeComponentsByType('GridFieldPaginator');
  
          $items = $gridField->getManipulatedList();
  
          foreach ($gridField->getConfig()->getComponents() as $component) {
              if ($component instanceof GridFieldFilterHeader || $component instanceof GridFieldSortableHeader) {
                  $items = $component->getManipulatedData($gridField, $items);
              }
          }
  
          $arrayList = new ArrayList();
  
          foreach ($items->limit(null) as $item) {
              if (!$item->hasMethod('canView') || $item->canView()) {
                  $arrayList->add($item);
              }
          }
  
          return $arrayList;
      }
code_tokens: protected function getItems ( GridField $ gridField ) { $ gridField -> getConfig ( ) -> removeComponentsByType ( 'GridFieldPaginator' ) ; $ items = $ gridField -> getManipulatedList ( ) ; foreach ( $ gridField -> getConfig ( ) -> getComponents ( ) as $ component ) { if ( $ component instanceof GridFieldFilterHeader || $ component instanceof GridFieldSortableHeader ) { $ items = $ component -> getManipulatedData ( $ gridField , $ items ) ; } } $ arrayList = new ArrayList ( ) ; foreach ( $ items -> limit ( null ) as $ item ) { if ( ! $ item -> hasMethod ( 'canView' ) || $ item -> canView ( ) ) { $ arrayList -> add ( $ item ) ; } } return $ arrayList ; }
docstring: Helper function to extract the item list out of the GridField.
  @param  GridField $gridField
  @return SS_list
docstring_tokens: Helper function to extract the item list out of the GridField .