code: public function fetchAll(ConfigInterface $objConfig)
      {
          $backupLanguage = $this->setLanguage($this->getCurrentLanguage());
  
          $filter = $this->prepareFilter($objConfig);
          if ($objConfig->getIdOnly()) {
              $this->setLanguage($backupLanguage);
  
              return $this->getIdsFromFilter($filter, $objConfig);
          }
  
          $items      = $this->getItemsFromFilter($filter, $objConfig);
          $collection = $this->getEmptyCollection();
          foreach ($items as $objItem) {
              $collection->push(new Model($objItem));
          }
          $this->setLanguage($backupLanguage);
  
          return $collection;
      }
docs: Fetch all records (optional filtered, sorted and limited).
  
  @param ConfigInterface $objConfig The configuration to be applied.
  
  @return CollectionInterface|ModelInterface[]|string[]