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;
}