39 lines
1.1 KiB
PHP
39 lines
1.1 KiB
PHP
<?php
|
|
/**
|
|
* core/template/navigation.php
|
|
*
|
|
* This class is for managing template navigation including menus, pagination, and breadcrumbs.
|
|
*
|
|
* @version 3.0
|
|
* @author Joey Kimsey <Joey@thetempusproject.com>
|
|
* @link https://TheTempusProject.com/Core
|
|
* @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;
|
|
}
|
|
}
|