Commit | Line | Data |
---|---|---|
11ade432 | 1 | <?php |
ef875357 | 2 | namespace wcf\system\cache\builder; |
11ade432 | 3 | use wcf\data\template\listener\TemplateListenerList; |
11ade432 AE |
4 | |
5 | /** | |
6 | * Caches template listener information. | |
7 | * | |
8 | * @author Alexander Ebert | |
ca4ba303 | 9 | * @copyright 2001-2014 WoltLab GmbH |
11ade432 AE |
10 | * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php> |
11 | * @package com.woltlab.wcf | |
8cb7186a | 12 | * @subpackage system.cache.builder |
9f959ced | 13 | * @category Community Framework |
6dfe934f | 14 | * @deprecated since 2.1 |
11ade432 | 15 | */ |
07356d6b | 16 | class TemplateListenerCacheBuilder extends AbstractCacheBuilder { |
11ade432 | 17 | /** |
0ad90fc3 | 18 | * @see \wcf\system\cache\builder\AbstractCacheBuilder::rebuild() |
11ade432 | 19 | */ |
07356d6b | 20 | public function rebuild(array $parameters) { |
11ade432 AE |
21 | // get templates for current package id |
22 | $templateListenerList = new TemplateListenerList(); | |
07356d6b | 23 | $templateListenerList->getConditionBuilder()->add("template_listener.environment = ?", array($parameters['environment'])); |
79b90008 | 24 | $templateListenerList->sqlOrderBy = "template_listener.listenerID ASC"; |
11ade432 AE |
25 | $templateListenerList->readObjects(); |
26 | ||
27 | $data = array(); | |
28 | foreach ($templateListenerList->getObjects() as $templateListener) { | |
29 | $data[$templateListener->templateName] = array(); | |
30 | } | |
31 | ||
32 | return $data; | |
33 | } | |
34 | } |