Example #1
0
function info_remove_empty($info)
{
    foreach ($info as $key => $value) {
        if (is_array($value)) {
            $info[$key] = info_remove_empty($info[$key]);
        }
        if (info_is_empty($info[$key])) {
            unset($info[$key]);
        }
    }
    return $info;
}
Example #2
0
 /**
  * @AjaxCallable=TRUE
  * @AjaxAsync=TRUE
  * @AjaxMethod=GET
  */
 function place_info($poiID, $type)
 {
     $poi = POIModel::load($poiID);
     $info = info_remove_empty($poi->get_info());
     return t('marina', $info, $type);
 }