Page MenuHomePhabricator

TYPProfileCatalogController.php
No OneTemporary

TYPProfileCatalogController.php

<?php
namespace Drupal\typ_profile\Controller;
use Drupal\Core\Controller\ControllerBase;
/**
*
*/
class TYPProfileCatalogController extends ControllerBase
{
static $customer;
public function catalogTitle($bizid){
if (!self::$customer){
self::$customer = \Drupal::service('typ.search')->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;
}
}
?>

File Metadata

Mime Type
text/x-php
Expires
Tue, Dec 24, 7:28 AM (1 d, 17 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
193612

Event Timeline