Exemple #1
0
/**
 * Gets category description from current premium, if $locale is unspecified $locale is current user locale
 *
 * @param type $locale
 * @return string 
 */
function osc_premium_category_description($locale = "")
{
    if ($locale == "") {
        $locale = osc_current_user_locale();
    }
    if (!View::newInstance()->_exists('premium_category')) {
        View::newInstance()->_exportVariableToView('premium_category', Category::newInstance()->findByPrimaryKey(osc_premium_category_id()));
    }
    $category = View::newInstance()->_get('premium_category');
    return osc_field($category, "s_description", $locale);
}
Exemple #2
0
/**
 * Gets a specific field from current alert
 *
 * @param array $field
 * @return mixed
 */
function osc_alert_field($field)
{
    return osc_field(View::newInstance()->_current('alerts'), $field, '');
}
Exemple #3
0
/**
 * Gets locale generic field
 *
 * @param $field
 * @param $locale
 * @return string
 */
function osc_locale_field($field, $locale = '')
{
    return osc_field(osc_locale(), $field, $locale);
}
Exemple #4
0
/**
 * Gets item meta slug
 *
 * @return string
 */
function osc_item_meta_slug()
{
    return osc_field(osc_item_meta(), 's_slug', '');
}
Exemple #5
0
/**
 * Gets the current latest search total
 *
 * @return string
 */
function osc_latest_search_total()
{
    return osc_field(osc_latest_search(), 'i_total', '');
}
Exemple #6
0
function osc_item_category_description($locale = "")
{
    if ($locale == "") {
        $locale = osc_current_user_locale();
    }
    $category = Category::newInstance()->findByPrimaryKey(osc_item_category_id());
    return osc_field($category, "s_description", $locale);
}
Exemple #7
0
/**
 * Gets current page field
 *
 * @param string $field
 * @param string $locale
 * @return string
 */
function osc_static_page_field($field, $locale = '')
{
    return osc_field(osc_static_page(), $field, $locale);
}
Exemple #8
0
/**
 * Low level function: Gets the value of the category attribute
 *
 * @return <array>
 */
function osc_category_field($field, $locale = '')
{
    return osc_field(osc_category(), $field, "");
}
Exemple #9
0
/**
 * Gets city area's items
 *
 * @return int
 */
function osc_city_area_items()
{
    return osc_field(osc_city_area(), 'items', '');
}
Exemple #10
0
function osc_list_city_items()
{
    return osc_field(osc_list_city(), 'items', '');
}