Files
houdini/classes/loader.php
2025-02-02 18:08:59 -05:00

39 lines
1.1 KiB
PHP

<?php
/**
* core/template/navigation.php
*
* This class is for managing template navigation including menus, pagination, and breadcrumbs.
*
* @version 2.0.3
* @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com/libraries/Houdini
* @license https://opensource.org/licenses/MIT [MIT LICENSE]
*/
namespace TheTempusProject\Houdini\Classes;
use TheTempusProject\Houdini\Classes\Components;
class Loader {
protected $cssIncludes = [];
protected $jsIncludes = [];
public function buildComponents() {
Components::append( 'TEMPLATE_CSS_INCLUDES', implode( "\n", $this->cssIncludes ) );
Components::append( 'TEMPLATE_JS_INCLUDES', implode( "\n", $this->jsIncludes ) );
}
public function addCss( $text, $parse = true ) {
if ( $parse ) {
$text = Template::parse( $text );
}
$this->cssIncludes[] = $text;
}
public function addJs( $text, $parse = true ) {
if ( $parse ) {
$text = Template::parse( $text );
}
$this->jsIncludes[] = $text;
}
}