Added box controller events
authorMarcel Werk <burntime@woltlab.com>
Wed, 13 Apr 2016 10:45:40 +0000 (12:45 +0200)
committerMarcel Werk <burntime@woltlab.com>
Wed, 13 Apr 2016 13:30:24 +0000 (15:30 +0200)
wcfsetup/install/files/lib/system/box/AbstractBoxController.class.php

index 504c5b09bd13c65f28043c234e64b08c9ae05b34..7eb6239bedcfef0ebedd2df542cde9dbaeaa8fdc 100644 (file)
@@ -1,6 +1,7 @@
 <?php
 namespace wcf\system\box;
 use wcf\data\box\Box;
+use wcf\system\event\EventHandler;
 
 /**
  * Default implementation for box controllers.
@@ -23,7 +24,7 @@ abstract class AbstractBoxController implements IBoxController {
         * box content
         * @var string
         */
-       protected $content;
+       public $content;
        
        /**
         * supported box positions
@@ -44,7 +45,12 @@ abstract class AbstractBoxController implements IBoxController {
        public function getContent() {
                if ($this->content === null) {
                        $this->content = '';
+                       
+                       EventHandler::getInstance()->fireAction($this, 'beforeLoadContent');
+                       
                        $this->loadContent();
+                       
+                       EventHandler::getInstance()->fireAction($this, 'afterLoadContent');
                }
                
                return $this->content;