Page MenuHomePhabricator

TYPProfileController.php
No OneTemporary

TYPProfileController.php

<?php
/**
* @file
* Contains \Drupal\page_example\Controller\TableSortExampleController.
*/
/**/
namespace Drupal\typ_profile\Controller;
use Drupal\Core\Controller\ControllerBase;
use Symfony\Component\HttpFoundation\JsonResponse;
use Drupal\Core\Database\Query;
use Drupal\Core\Url;
/**
* Controller routines for tablesort example routes.
*/
class TYPProfileController extends ControllerBase
{
/*public function profile_redirect(){
return $this->redirect("<front>");
}*/
public function profilePage($bizid){
$language = \Drupal::languageManager()->getCurrentLanguage()->getId();
$data = \Drupal::service("typ.search")->getProfile($bizid ,AUTO);
if (!$data) {
return $this->redirect("<front>");
}
$dataproddesct = html_entity_decode($data['proddesc']);
// echo "<pre>";
// var_export($data);
// exit;
$display[] = array(
'#theme' => 'typ_profile',
'#profile' => $data,
'#prodescription' => $dataproddesct,
);
return $display;
}
}

File Metadata

Mime Type
text/x-php
Expires
Wed, May 22, 9:07 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
165013

Event Timeline