Developer Center

Admin Area Content / Output

To create the content, you should create a function with adminArea name in the class, its return must strictly be array.

Links/Actions

Using $this->area_link variable, you can define returned URLs to your module. $this->area_link variable will be in "http://..../admin/tools/addons/SampleAddon" format. For links, you can add as "?variable1=x&variable2=y" for links. For forms, use the POST form method to retrieve user input.

In the Output function, to get user input; $ _GET or $ _POST variables can be directly accessed.

Client or Administrator Data

You can use $this->user[] or $this->admin[] variable in the function, see "Parameters" document to learn the data you will obtain from variables.

Sample Function

public function adminArea()
{
    $action = Filter::init("REQUEST/action","route");
    if(!$action) $action = 'index';

    $variables = [
        'link'              => $this->area_link,  /* https://***..com/admin/tools/addons/SampleAddon */
        'dir_link'          => $this->url,       /* https://***..com/coremio/modules/Addons/SampleAddon/ */
        'dir_path'          => $this->dir,      /* /-- DOCUMENT ROOT --/coremio/modules/Addons/SampleAddon/ */
        'dir_name'          => $this->_name,    /* SampleAddon, */
        'name'              => $this->lang["meta"]["name"], /* Sample Addon */
        'version'           => $this->config["meta"]["version"], /* 1.0 */
        'fields'            => $this->fields(),
    ];

    return [
        'page_title'        => 'Sample Addon Module',
        'breadcrumbs'       => [
            [
                'link'      => '',
                'title'     => 'Sample Addon',
            ],
        ],
        'content'           => $this->view($action.".php",$variables)
    ];
}
Parameters Client Area Content / Output

Do you have any questions?

Feel free to contact us
Contact Us
Copyright © 2024. All Rights Reserved.
Join Our Discord Channel
Top