This commit is contained in:
Joey Kimsey
2024-08-07 19:21:38 -04:00
parent 8e2b161885
commit 41d2a45ad6
17 changed files with 1912 additions and 85 deletions

38
classes/loader.php Normal file
View File

@ -0,0 +1,38 @@
<?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;
}
}