contributions/text.html/behaviour/base/text.html.eventsink.php
Go to the documentation of this file.00001 <?php 00002 /** 00003 * EventSink to catch view rendering events 00004 * 00005 * @author Gerd Riesselmann 00006 * @ingroup Html 00007 */ 00008 class TextHtmlEventSink implements IEventSink { 00009 /** 00010 * Invoked to handle events 00011 * 00012 * Events can be anything, and they are invoked through the router 00013 * One event is "cron", it has no parameters 00014 * 00015 * @param string Event name 00016 * @param mixed Event parameter(s) 00017 */ 00018 public function on_event($event_name, $event_params, &$result) { 00019 if ($event_name == 'view_after_render') { 00020 $view = Arr::get_item($event_params, 'view', false); 00021 if ($view instanceof ContentViewBase) { 00022 HtmlText::apply_enabled_editors($view->get_page_data()); 00023 } 00024 } 00025 } 00026 }