Skip to content

$Applet - What is that ? #2

@stanislav-web

Description

@stanislav-web

Applet - is a basic instance object of your CMS (here ported from BitrixCMS)

To make it clear that there is need to use this class :

abstract class AppletAbstract {

/**
 * Set current page for detect location
 *
 * @return string
 */
public function GetCurPage() {
    return $_SERVER['REQUEST_URI'];
}

/**
 * Add custom css file for catalogue
 *
 * @param string $cssFilePath e.g /css/styles.css
 * @return null
 */
public function SetAdditionalCSS($cssFilePath = '') {
    // add css to <link rel="stylesheet" href="" />
    return null;
}

/**
 * Add custom js file for catalogue
 *
 * @param string $jsFilePath e.g /js/scripts.js
 * @return null
 */
public function AddHeadScript($jsFilePath = '') {
    // add js to <script src="..." />
    return null;
}

/**
 * Set catalogue title
 *
 * @param string $title <title></title>
 */
public function SetTitle($title = '') {
    // set meta title of header
    return null;
}

}
class Applet extends AppletAbstract {
}

$Applet = new Applet();

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions