mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 12:19:28 +00:00
feature(FHC Core Renderer Event): adds the FHC Core renderer Event to the loadRenderer Event
This commit is contained in:
@@ -49,6 +49,9 @@ require_once(APPPATH.'config/Events.php');
|
||||
|
||||
$active_addons_array = explode(";", ACTIVE_ADDONS);
|
||||
|
||||
// Load Events from FHC core
|
||||
require_once APPPATH.'core/Events.php';
|
||||
|
||||
foreach (scandir(APPPATH.'config/extensions') as $dir)
|
||||
if ($dir[0] != '.' && file_exists(APPPATH.'config/extensions/'.$dir.'/Events.php'))
|
||||
require_once APPPATH.'config/extensions/'.$dir.'/Events.php';
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
use CI3_Events as Events;
|
||||
|
||||
Events::on('loadRenderers', function ($renderers) {
|
||||
$fhc_core_renderers =& $renderers();
|
||||
$fhc_core_renderers["lehreinheit"] = array(
|
||||
'calendarEvent' => APP_ROOT.'public/js/components/Cis/Stundenplan/EventTypes/calendarEvent.js',
|
||||
'modalTitle' => APP_ROOT.'public/js/components/Cis/Mylv/modalTitle.js',
|
||||
'modalContent' => APP_ROOT.'public/js/components/Cis/Mylv/modalContent.js'
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user