Changeset View
Changeset View
Standalone View
Standalone View
branches/5.2.x/core/units/stylesheets/stylesheets_event_handler.php
Show All 19 Lines | |||||
* [HOOK] Compile stylesheet file based on theme definitions | * [HOOK] Compile stylesheet file based on theme definitions | ||||
* | * | ||||
* @param kEvent $event | * @param kEvent $event | ||||
* @return void | * @return void | ||||
* @access protected | * @access protected | ||||
*/ | */ | ||||
protected function OnCompileStylesheet($event) | protected function OnCompileStylesheet($event) | ||||
{ | { | ||||
/** @var StylesheetsItem $object */ | |||||
$object = $event->getObject( Array ('skip_autoload' => true) ); | $object = $event->getObject( Array ('skip_autoload' => true) ); | ||||
/* @var $object StylesheetsItem */ | |||||
$object->SwitchToLive(); | $object->SwitchToLive(); | ||||
$ids = explode(',', $event->MasterEvent->getEventParam('ids')); | $ids = explode(',', $event->MasterEvent->getEventParam('ids')); | ||||
if ( !$ids ) { | if ( !$ids ) { | ||||
return ; | return ; | ||||
} | } | ||||
foreach ($ids as $id) { | foreach ($ids as $id) { | ||||
$object->Load($id); | $object->Load($id); | ||||
$object->Compile(); | $object->Compile(); | ||||
} | } | ||||
} | } | ||||
} | } | ||||
No newline at end of file | No newline at end of file |