/** * Prepare the indexer client */ public function _on_reindex($topic, $config, &$indexer) { $qb = org_openpsa_invoices_invoice_dba::new_query_builder(); $schemadb = midcom_helper_datamanager2_schema::load_database($config->get('schemadb')); $indexer = new org_openpsa_invoices_midcom_indexer($topic, $indexer); $indexer->add_query('invoices', $qb, $schemadb); return $indexer; }
/** * Method for adding or updating the invoice to the MidCOM indexer service. * * @param $dm Datamanager2 instance containing the object */ public function _index_object(&$dm) { $indexer = new org_openpsa_invoices_midcom_indexer($this->_topic); return $indexer->index($dm); }