Skin stuff - autoversioning mainly.
This is the code documentation for the SproutCMS project
Search documentation |
class SkinSkin stuff - autoversioning mainly.
Extending this class<?php
/**
* New class description goes here
*
* @author Your Name, 2025-11-18
**/
class NewClassName extends Skin {
/**
* Find a template within the current skin.
**/
public function findTemplate (mixed $name, mixed $extension) {
// Method code goes here
}
/**
* Return the URL for a JS file in the skin for the current subsite.
* The URL will have an embedded timestamp.
*
* Usage example:
* <script src="<?php echo Skin::cssUrl('site'); ?>"></script>
**/
public function jsUrl ($file) {
// Method code goes here
}
/**
* ECHOs one or more <script> tags referring to specified JS files.
* Uses variable arguments, one per css file.
* The URLs will contain embedded timestamps, making them auto-versioned
*
* Usage example:
* <?php Skin::js('site', 'home'); ?>
*
* Optionally provide an array to specify attributes, like so:
* <?php Skin::js('site', 'home', ['crossorigin' => 'anonymous', 'defer' => '']); ?>
* Will return:
* <script src="skin-ts/skin/js/site.js" crossorigin="anonymous" defer=""></script>
* <script src="skin-ts/skin/js/home.js" crossorigin="anonymous" defer=""></script>
*
* There isn't a guarantee that multiple tags will be ECHOed, but the order will always remain as specified.
* If you need more control use the helper `js_url` and echo the tags yourself.
**/
public function js () {
// Method code goes here
}
/**
* ECHOs a <link> tag and a <script> tag which point to common.css and common.js respectively.
**/
public function common () {
// Method code goes here
}
/**
* ECHOs one or more <link> tags referring to specified CSS files.
* Uses variable arguments, one per css file.
* The URLs will contain embedded timestamps, making them auto-versioned
*
* Usage example:
* <?php Skin::css('reset', 'layout', 'content'); ?>
*
* Optionally provide an array to specify attributes, like so:
* <?php Skin::css('site', 'home', ['crossorigin' => 'anonymous', 'media' => 'print']); ?>
* Will return:
* <link href="skin-ts/skin/css/site.css" rel='stylesheet' media='print'>
* <link href="skin-ts/skin/css/home.css" rel='stylesheet' media='print'>
*
* There isn't a guarantee that multiple tags will be ECHOed, but the order will always remain as specified.
* If you need more control use the helper `css_url` and echo the tags yourself.
**/
public function css () {
// Method code goes here
}
/**
* Return the URL for a CSS file in the skin for the current subsite.
* The URL will have an embedded timestamp.
*
* Usage example:
* <link href="<?php echo Skin::cssUrl('layout'); ?>" rel="stylesheet">
**/
public function cssUrl ($file) {
// Method code goes here
}
/**
* ECHOs one or more <link> tags for the module css
* Uses either modules.css in the the skin css directory or the module.css in the modules media directories
**/
public function modules () {
// Method code goes here
}
}
?>
|
| Powered by Pelzini, version 0.9.0 |
Documentation is made available under the
GNU Free Documentation License 1.2. Generated: Monday, 3rd April, 2023 at 02:59 pm |
|