Commit | Line | Data |
---|---|---|
d43dd49d JR |
1 | <?php |
2 | namespace wcf\acp\page; | |
3 | use wcf\data\object\type\ObjectTypeCache; | |
4 | use wcf\page\AbstractPage; | |
5 | use wcf\system\WCF; | |
6 | ||
7 | /** | |
8 | * Shows a list of sitemap object types. | |
9 | * | |
10 | * @author Joshua Ruesweg | |
11 | * @copyright 2001-2017 WoltLab GmbH | |
12 | * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php> | |
13 | * @package WoltLabSuite\Core\Acp\page | |
14 | * @since 3.1 | |
15 | */ | |
16 | class SitemapListPage extends AbstractPage { | |
17 | /** | |
18 | * @inheritDoc | |
19 | */ | |
20 | public $activeMenuItem = 'wcf.acp.menu.link.maintenance.sitemap'; | |
21 | ||
22 | /** | |
23 | * @inheritDoc | |
24 | */ | |
25 | public $neededPermissions = ['admin.management.canRebuildData']; | |
26 | ||
27 | /** | |
28 | * @var array<ObjectType> | |
29 | */ | |
30 | public $sitemapObjectTypes = []; | |
31 | ||
32 | /** | |
33 | * @inheritDoc | |
34 | */ | |
35 | public function readData() { | |
36 | parent::readData(); | |
37 | ||
38 | $this->sitemapObjectTypes = ObjectTypeCache::getInstance()->getObjectTypes('com.woltlab.wcf.sitemap.object'); | |
39 | } | |
40 | ||
41 | /** | |
42 | * @inheritDoc | |
43 | */ | |
44 | public function assignVariables() { | |
45 | parent::assignVariables(); | |
46 | ||
47 | WCF::getTPL()->assign([ | |
48 | 'sitemapObjectTypes' => $this->sitemapObjectTypes | |
49 | ]); | |
50 | } | |
51 | } |