Пример #1
0
 function getData()
 {
     // get srId from URL
     $srID = \RightNow\Utils\Url::getParameter('sr_id');
     if (!($srID = intval(\RightNow\Utils\Url::getParameter('sr_id')))) {
         // get i_id from URL
         $incidentID = \RightNow\Utils\Url::getParameter('i_id');
         if (!($incidentID = intval(\RightNow\Utils\Url::getParameter('i_id')))) {
             echo $this->reportError(sprintf('Invalid ID'));
             return false;
         }
         // fetch Incident from DB by ID
         if ($incident = RNCPHP\Incident::fetch(intval($incidentID))) {
             $srID = $incident->CustomFields->Accelerator->ebs_sr_id;
         }
     }
     if (!$srID) {
         echo $this->reportError(sprintf('Invalid Service Request ID'));
         return false;
     }
     // render to js
     $this->data['js']['sr_id'] = $srID;
     $this->data['js']['ext_server_type'] = $this->extServerType;
     $this->data['js']['development_mode'] = IS_DEVELOPMENT;
     return parent::getData();
 }
Пример #2
0
 function __construct($attrs)
 {
     parent::__construct($attrs);
     // get external server type
     $this->extServerType = $this->CI->model('custom/ExtIntegrationConfigVerb')->getExtServerType();
     // set up Ajax handler
     $this->setAjaxHandlers(array('get_sr_list_ajax_endpoint' => array('method' => 'handleGetSRListAjaxEndpoint', 'clickstream' => 'custom_action')));
 }
Пример #3
0
 function getData()
 {
     $prodcat = $this->data['attrs']['prodcat'];
     if ($prodcat == 'categories') {
         $cats = $this->CI->model('Prodcat')->getHierarchy(HM_CATEGORIES, 2);
         $this->data["categories"] = $cats->result;
     } else {
         $cats = $this->CI->model('Prodcat')->getHierarchy(HM_PRODUCTS, 2);
         $this->data["products"] = $cats->result;
     }
     return parent::getData();
 }
Пример #4
0
 function getData()
 {
     return parent::getData();
 }
Пример #5
0
 function __construct($attrs)
 {
     parent::__construct($attrs);
 }