diff --git a/src/Controller/TYPProfileCatalogController.php b/src/Controller/TYPProfileCatalogController.php new file mode 100644 --- /dev/null +++ b/src/Controller/TYPProfileCatalogController.php @@ -0,0 +1,40 @@ +getProfile($bizid, AUTO); + } + return t(self::$customer['humanname']); + } + + public static function catalogPage($bizid){ + global $base_path; + if (!self::$customer){ + self::$customer = \Drupal::service('typ.search')->getProfile($bizid, AUTO); + } + $customer = self::$customer; + $options['WHAT'] = $customer['customerid']; + $options['FROM'] = 0; + $options['CATALOG_SIZE'] = 999; + $options['SEARCH_MODE'] = 'CUSTOMERID'; + $result = \Drupal::service('typ.search')->searchCatalog($options); + + $display[] = array( + '#theme' => 'typ_search_results', + '#resultsOnlineCatalog' => $result['_res'], + '#time' => $result['_time'], + '#total' => $result['_total'], + '#base_path' => $base_path + ); + return $display; + } +} +?> \ No newline at end of file