yf_manage_shop__show_header admin module

Fileplugins/shop/admin_modules/manage_shop/yf_manage_shop__show_header.class.php
Useadmin URL ?object=manage_shop__show_header

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

_show_header

public function _show_header()
    public function _show_header()
    {
        $pheader = t('Shop');
        $subheader = _ucwords(str_replace('_', ' ', $_GET['action']));
        $cases = [
            //$_GET["action"] => {string to replace}
            'show' => 'Products',
            'add' => 'Add product',
        ];
        if (isset($cases[$_GET['action']])) {
            $subheader = $cases[$_GET['action']];
        }
        return [
            'header' => $pheader,
            'subheader' => $subheader ? _prepare_html($subheader) : '',
        ];
    }