本文整理汇总了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;
}