/**
  * Short description of method initColumns
  *
  * @access public
  * @author Somsack Sipasseuth, <*****@*****.**>
  * @return boolean
  */
 public function initColumns()
 {
     $returnValue = (bool) false;
     $this->grid->addColumn('unit', __('Unit'));
     $this->grid->addColumn('country', __('Country'));
     $this->grid->addColumn('language', __('Language'));
     $returnValue = parent::initColumns();
     $returnValue = $this->grid->setColumnsAdapter(array('unit', 'country', 'language'), new wfAuthoring_helpers_Monitoring_TranslationMetaAdapter());
     return (bool) $returnValue;
 }
 /**
  * Get JSON monitoring data
  */
 public function monitorProcess()
 {
     $filters = array();
     if ($this->hasRequestParameter('filter')) {
         $filters = $this->getFilterState('filter');
     }
     //get the processes uris
     $processesUri = $this->hasRequestParameter('processesUri') ? $this->getRequestParameter('processesUri') : null;
     $processInstancesClass = new core_kernel_classes_Class(CLASS_PROCESSINSTANCES);
     if (!is_null($filters)) {
         $processExecutions = $processInstancesClass->searchInstances($filters, array('recursive' => true));
     } else {
         if (!is_null($processesUri)) {
             foreach ($processesUri as $processUri) {
                 $processExecutions[$processUri] = new core_kernel_classes_resource($processUri);
             }
         } else {
             $processExecutions = $processInstancesClass->getInstances();
         }
     }
     $processMonitoringGrid = new wfAuthoring_helpers_Monitoring_ProcessMonitoringGrid(array_keys($processExecutions), $this->processMonitoringGridOptions);
     $data = $processMonitoringGrid->toArray();
     echo json_encode($data);
 }