本文整理匯總了PHP中wpl_global::return_in_id_array方法的典型用法代碼示例。如果您正苦於以下問題:PHP wpl_global::return_in_id_array方法的具體用法?PHP wpl_global::return_in_id_array怎麽用?PHP wpl_global::return_in_id_array使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類wpl_global
的用法示例。
在下文中一共展示了wpl_global::return_in_id_array方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: start
public function start($layout, $params)
{
$room_types = wpl_global::return_in_id_array(wpl_room_types::get_room_types());
/** include layout **/
$layout_path = _wpl_import($layout, true, true);
include $layout_path;
}
示例2: generate_finalize_query
/**
* Generates finalize query of property converts units to SI units etc.
* @author Howard <howard@realtyna.com>
* @static
* @param type $data
* @param type $id
* @return string
*/
public static function generate_finalize_query($data, $id = '')
{
$units = wpl_global::return_in_id_array(wpl_units::get_units('', 1));
$query = '';
foreach ($data as $field => $value) {
if (!strstr($field, '_unit')) {
continue;
}
if (!isset($units[$value])) {
continue;
}
$core_field = str_replace('_unit', '', $field);
if (!array_key_exists($core_field . '_si', $data)) {
continue;
}
if (!isset($data[$core_field])) {
continue;
}
$si_value = $units[$value]['tosi'] * $data[$core_field];
$query .= "`" . $core_field . "_si`='" . $si_value . "',";
if (isset($data[$core_field . '_max'])) {
$si_value = $units[$value]['tosi'] * $data[$core_field . '_max'];
$query .= "`" . $core_field . "_max_si`='" . $si_value . "',";
}
}
return $query;
}