objProductCollectionModel = new ProductCollectionModel(); if(!$this->isDefaultLanguage()) { //$this->objProductCategoryLanguageModel->createTableLang(); parent::__construct( $this->objProductCollectionModel, new ProductCollectionLanguageModel() ); }else{ parent::__construct( $this->objProductCollectionModel ); } } public function getTotalProduct($collection_id, array $condition = []) { return $this->objProductCollectionModel->getTotalProduct($collection_id, $condition); } public function getListProduct($collection_id, array $condition = []) { return $this->objProductCollectionModel->getListProduct($collection_id, $condition); } protected function formatItemInList(array $info) : array { return $this->formatItemInfo($info); } protected function formatItemInfo(?array $info) : ?array { $info['url'] = "/collection/".$info['url_index']; return $info; } }