当前位置: 首页>>代码示例>>PHP>>正文


PHP wpl_global::get_property_types方法代码示例

本文整理汇总了PHP中wpl_global::get_property_types方法的典型用法代码示例。如果您正苦于以下问题:PHP wpl_global::get_property_types方法的具体用法?PHP wpl_global::get_property_types怎么用?PHP wpl_global::get_property_types使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在wpl_global的用法示例。


在下文中一共展示了wpl_global::get_property_types方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: generate_search_form

 public function generate_search_form()
 {
     $this->property_types = wpl_global::get_property_types();
     $this->listings = wpl_global::get_listings();
     $this->users = wpl_users::get_wpl_users();
     parent::render($this->tpl_path, 'search_form');
 }
开发者ID:amankatoch,项目名称:wp-plugin,代码行数:7,代码来源:wpl_main.php

示例2: get_property_types

 /**
  * Deprecated -> Use wpl_global::get_property_types instead.
  * @author Howard R <howard@realtyna.com>
  * @static
  * @deprecated
  * @return array
  */
 public static function get_property_types()
 {
     return wpl_global::get_property_types('', 0);
 }
开发者ID:gvh1993,项目名称:project-vvvh,代码行数:11,代码来源:property_types.php

示例3: __

        </div>
    </div>
</div>
<div class="side-6 side-statistic2">
    <div class="panel-wp">
        <h3><?php 
echo __('Properties by property types', WPL_TEXTDOMAIN);
?>
</h3>
        <div class="panel-body">
        	<?php 
$properties = wpl_db::select("SELECT COUNT(*) as count, `property_type` FROM `#__wpl_properties` WHERE `finalized`='1' AND `expired`='0' AND `confirmed`='1' AND `deleted`='0' AND `property_type`!='0' GROUP BY `property_type`", 'loadAssocList');
$data = array();
$total = 0;
foreach ($properties as $property) {
    $property_type = wpl_global::get_property_types($property['property_type']);
    if (is_object($property_type)) {
        $data[__($property_type->name, WPL_TEXTDOMAIN)] = $property['count'];
        $total += $property['count'];
    }
}
$params = array('chart_background' => '#fafafa', 'chart_width' => '100%', 'chart_height' => '250px', 'show_value' => 1, 'data' => $data);
if (count($data)) {
    echo '<div class="wpl-total-properties">' . sprintf(__('Total Properties: %s', WPL_TEXTDOMAIN), $total) . '</div>';
    wpl_global::import_activity('charts:bar', '', $params);
} else {
    echo __('No data!', WPL_TEXTDOMAIN);
}
?>
        </div>
    </div>
开发者ID:gvh1993,项目名称:project-vvvh,代码行数:31,代码来源:internal_statistic.php

示例4: __

        $html .= '<select name="sf' . $widget_id . '_tmin_' . $field_data['table_column'] . '" id="sf' . $widget_id . '_tmin_' . $field_data['table_column'] . '">';
        $html .= '<option value="-1" ' . ($current_min_value == $i ? 'selected="selected"' : '') . '>' . __($field['name'], WPL_TEXTDOMAIN) . '</option>';
        $selected_printed = false;
        if ($current_min_value == $i) {
            $selected_printed = true;
        }
        while ($i < $max_value) {
            $html .= '<option value="' . $i . '" ' . (($current_min_value == $i and !$selected_printed) ? 'selected="selected"' : '') . '>' . $i . '+</option>';
            $i += $division;
        }
        $html .= '<option value="' . $max_value . '">' . $max_value . '+</option>';
        $html .= '</select>';
    }
    $done_this = true;
} elseif ($type == 'property_types' and !$done_this) {
    $property_types = wpl_global::get_property_types();
    switch ($field['type']) {
        case 'select':
            $show = 'select';
            $any = true;
            $multiple = false;
            $label = true;
            break;
        case 'multiple':
            $show = 'multiple';
            $any = false;
            $multiple = true;
            $label = true;
            break;
        case 'checkboxes':
            $show = 'checkboxes';
开发者ID:amankatoch,项目名称:wp-plugin,代码行数:31,代码来源:general.php

示例5: update_property_title

 /**
  * Updates property title
  * @author Howard <howard@realtyna.com>
  * @static
  * @param array $property_data
  * @param int $property_id
  * @param boolean $force
  * @return string
  */
 public static function update_property_title($property_data, $property_id = 0, $force = false)
 {
     /** fetch property data if property id is setted **/
     if ($property_id) {
         $property_data = self::get_property_raw_data($property_id);
     }
     if (!$property_id) {
         $property_id = $property_data['id'];
     }
     $column = 'field_313';
     $field_id = wpl_flex::get_dbst_id($column, $property_data['kind']);
     $field = wpl_flex::get_field($field_id);
     $base_column = NULL;
     if (isset($field->multilingual) and $field->multilingual and wpl_global::check_multilingual_status()) {
         $base_column = wpl_global::get_current_language() == wpl_addon_pro::get_default_language() ? $column : NULL;
         $column = wpl_addon_pro::get_column_lang_name($column, wpl_global::get_current_language(), false);
     }
     /** return current title if exists **/
     if (isset($property_data[$column]) and trim($property_data[$column]) != '' and !$force) {
         return $property_data[$column];
     }
     /** first validation **/
     if (!$property_data) {
         return '';
     }
     $listing_data = wpl_global::get_listings($property_data['listing']);
     $listing = isset($listing_data->name) ? $listing_data->name : '';
     $property_type_data = wpl_global::get_property_types($property_data['property_type']);
     $property_type = isset($property_type_data->name) ? $property_type_data->name : '';
     $title = array();
     $title['property_type'] = __($property_type, WPL_TEXTDOMAIN);
     $title['listing'] = __($listing, WPL_TEXTDOMAIN);
     if ($property_data['kind']) {
         $kind_label = wpl_flex::get_kind_label($property_data['kind']);
         if (trim($kind_label)) {
             $title['kind'] = '(' . __($kind_label, WPL_TEXTDOMAIN) . ')';
         }
     }
     $title_str = implode(' ', $title);
     /** apply filters **/
     _wpl_import('libraries.filters');
     @extract(wpl_filters::apply('generate_property_title', array('title' => $title, 'title_str' => $title_str)));
     /** update **/
     if (wpl_db::columns('wpl_properties', $column)) {
         $query = "UPDATE `#__wpl_properties` SET `" . $column . "`='" . $title_str . "' WHERE `id`='" . $property_id . "'";
         wpl_db::q($query, 'update');
     }
     /** update **/
     if ($base_column and wpl_db::columns('wpl_properties', $base_column)) {
         $query = "UPDATE `#__wpl_properties` SET `" . $base_column . "`='" . $title_str . "' WHERE `id`='" . $property_id . "'";
         wpl_db::q($query, 'update');
     }
     return $title_str;
 }
开发者ID:amankatoch,项目名称:wp-plugin,代码行数:63,代码来源:property.php

示例6: isset

    echo isset($value['extoption']) ? $value['extoption'] : '';
    ?>
" placeholder="<?php 
    echo __('min,max,increment like 0,10,1', WPL_TEXTDOMAIN);
    ?>
" title="<?php 
    echo __('min,max,increment like 0,10,1', WPL_TEXTDOMAIN);
    ?>
" />
		</div>
	</div>
</div>
<?php 
    $done_this = true;
} elseif ($type == 'property_types' and !$done_this) {
    $listings = wpl_global::get_property_types();
    ?>
<div class="search-field-wp search-field-property-type <?php 
    echo isset($value['enable']) ? $value['enable'] : '';
    ?>
" data-field-id="<?php 
    echo $field->id;
    ?>
" data-status="<?php 
    echo isset($value['enable']) ? $value['enable'] : '';
    ?>
" data-field-name="<?php 
    echo __($field->name, WPL_TEXTDOMAIN);
    ?>
">
开发者ID:amankatoch,项目名称:wp-plugin,代码行数:30,代码来源:general.php

示例7: defined

<?php

/** no direct access **/
defined('_WPLEXEC') or die('Restricted access');
if ($type == 'property_types' and !$done_this) {
    if (trim($value) != '0' or trim($value) != '-1') {
        /** get property type **/
        $property_type = wpl_global::get_property_types($value);
        $return['field_id'] = $field->id;
        $return['type'] = $field->type;
        $return['name'] = __($field->name, WPL_TEXTDOMAIN);
        $return['value'] = is_object($property_type) ? __($property_type->name, WPL_TEXTDOMAIN) : NULL;
    }
    $done_this = true;
} elseif ($type == 'listings' and !$done_this) {
    if (trim($value) != '0' or trim($value) != '-1') {
        /** get listing type **/
        $listing_type = wpl_global::get_listings($value);
        $return['field_id'] = $field->id;
        $return['type'] = $field->type;
        $return['name'] = __($field->name, WPL_TEXTDOMAIN);
        $return['value'] = is_object($listing_type) ? __($listing_type->name, WPL_TEXTDOMAIN) : NULL;
    }
    $done_this = true;
} elseif ($type == 'feature' and !$done_this) {
    if ($values[$field->table_column] != 0) {
        $return['field_id'] = $field->id;
        $return['type'] = $field->type;
        $return['name'] = __($field->name, WPL_TEXTDOMAIN);
        /** options of property column **/
        $column_options = $values[$field->table_column . '_options'];
开发者ID:amankatoch,项目名称:wp-plugin,代码行数:31,代码来源:general.php

示例8: get_meta_keywords

 /**
  * Returns property meta keywords, This function calls on sef service when meta description of property is empty
  * @author Howard <howard@realtyna.com>
  * @static
  * @param array $property_data
  * @param int $property_id
  * @return string
  */
 public static function get_meta_keywords($property_data, $property_id = 0)
 {
     /** fetch property data if property id is setted **/
     if ($property_id) {
         $property_data = self::get_property_raw_data($property_id);
     }
     if (!$property_id) {
         $property_id = $property_data['id'];
     }
     $keywords = array();
     if (isset($property_data['bedrooms']) and $property_data['bedrooms']) {
         $keywords[] = $property_data['bedrooms'] . ' ' . __('Bedroom' . ($property_data['bedrooms'] > 1 ? 's' : ''), WPL_TEXTDOMAIN);
     }
     if (isset($property_data['rooms']) and $property_data['rooms']) {
         $keywords[] = $property_data['rooms'] . ' ' . __('Room' . ($property_data['rooms'] > 1 ? 's' : ''), WPL_TEXTDOMAIN);
     }
     if (isset($property_data['bathrooms']) and $property_data['bathrooms']) {
         $keywords[] = $property_data['bathrooms'] . ' ' . __('Bathroom' . ($property_data['bathrooms'] > 1 ? 's' : ''), WPL_TEXTDOMAIN);
     }
     if (isset($property_data['property_type'])) {
         $property_type = wpl_global::get_property_types($property_data['property_type']);
         if (trim($property_type->name)) {
             $keywords[] = __($property_type->name, WPL_TEXTDOMAIN);
         }
     }
     if (isset($property_data['listing'])) {
         $listing = wpl_global::get_listings($property_data['listing']);
         if (trim($listing->name)) {
             $keywords[] = __($listing->name, WPL_TEXTDOMAIN);
         }
     }
     if (isset($property_data['mls_id'])) {
         $keywords[] = $property_data['mls_id'];
     }
     $keywords_str = implode(', ', $keywords);
     /** apply filters **/
     _wpl_import('libraries.filters');
     @extract(wpl_filters::apply('generate_meta_keywords', array('keywords_str' => $keywords_str, 'keywords' => $keywords, 'property_data' => $property_data)));
     return $keywords_str;
 }
开发者ID:gvh1993,项目名称:project-vvvh,代码行数:48,代码来源:property.php


注:本文中的wpl_global::get_property_types方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。