예제 #1
0
파일: obj.meter.php 프로젝트: r3-gis/EcoGIS
 /**
  * Return the Energy source list (different values from consumption/production)
  * @param array $request    the request
  * @return array            the result data
  */
 public function getEnergySourceList($request)
 {
     $constraint = array('esu_allow_in_building IS TRUE', $request['em_is_production'] == 'T' ? "esu_is_production='T'" : "esu_is_consumption='T'");
     return array('status' => R3_AJAX_NO_ERROR, 'data' => R3EcoGisHelper::forceJSonArray(R3EcoGisHelper::getEnergySourceList($this->do_id, $this->kind, array('constraints' => $constraint, 'allow_empty' => true))));
 }