/** * Writes articles into the database * * @param array $records * @throws \Exception * @throws AdapterException */ public function write($records) { //articles if (empty($records['article'])) { $message = $this->snippetHelper->getNamespace()->get('adapters/articles/no_records', 'No article records were found.'); throw new \Exception($message); } $records = $this->eventManager->filter('Shopware_Components_SwagImportExport_DbAdapters_ArticlesDbAdapter_Write', $records, ['subject' => $this]); $this->performImport($records); }
/** * @param \Enlight_Event_Handler $handler * @return \Enlight_Event_EventManager */ public function registerListener(\Enlight_Event_Handler $handler) { $this->eventsAmount++; return parent::registerListener($handler); }