_objectManager = $_objectManager; } /** * @param String $collectionType * @param array $data * @return AbstractCollection */ public function create(String $collectionType, array $data = []) { $collection = 'Stemcell\ChineseDirectory\Model\ResourceModel\\'.ucfirst($collectionType).'\Collection'; if (strtolower($collectionType)==='region') { $collection = 'Magento\Directory\Model\ResourceModel\Region\Collection'; } return $this->_objectManager->create($collection, $data); } }