Add afterInitObjectList event to MultipleLinkPage
authorTim Düsterhus <duesterhus@woltlab.com>
Mon, 26 Feb 2018 15:03:06 +0000 (16:03 +0100)
committerTim Düsterhus <duesterhus@woltlab.com>
Mon, 26 Feb 2018 15:12:06 +0000 (16:12 +0100)
This event basically is equivalent to the calculateNumberOfPages event.
It does, however, provide a less ambiguous place for additional SQL
conditions added by plugins: Pages that extend MultipleLinkPage add
their conditions in initObjectList, plugins can use afterInitObjectList
instead of calculateNumberOfPages for clarity.

wcfsetup/install/files/lib/page/MultipleLinkPage.class.php

index 45df8c3fdc0d7e037c2c245832b0063550459cba..bc106983b0bc3f4fec85724f21959496ae8bce30 100644 (file)
@@ -110,6 +110,8 @@ abstract class MultipleLinkPage extends AbstractPage {
                // initialize database object list
                $this->initObjectList();
                
+               EventHandler::getInstance()->fireAction($this, 'afterInitObjectList');
+               
                // calculates page number
                $this->calculateNumberOfPages();