yf_shop__categories_show user module

Fileplugins/shop/modules/shop/yf_shop__categories_show.class.php
Usemodule('shop__categories_show'), URL ?object=shop__categories_show

Public properties

PropertyDefaultDescription
None declared in this class.

Public methods 1

None without a leading underscore.

Methods starting with _ hooks and helpers; not routable as page actions

public function _categories_show()
    public function _categories_show()
    {
        $shop_cats = [];
        foreach ((array) module('shop')->_shop_cats_for_select as $_cat_id => $_cat_name) {
            if ( ! $_cat_name) {
                continue;
            }
            $shop_cats[_prepare_html($_cat_name)] = process_url('./?object=shop&action=show&id=' . (module('shop')->_shop_cats_all[$_cat_id]['url']));
        }
        if (empty($shop_cats)) {
            $shop_cats = '';
        }
        return tpl()->parse('shop/cats_block', [
            'shop_cats' => $shop_cats,
        ]);
    }