<options>module_paid_subscription</options>
</acpmenuitem>
<!-- /paid subscription -->
+
+ <!-- trophy -->
+ <acpmenuitem name="wcf.acp.menu.link.trophy">
+ <parent>wcf.acp.menu.link.user</parent>
+ <showorder>7</showorder>
+ </acpmenuitem>
+ <acpmenuitem name="wcf.acp.menu.link.trophy.category.list">
+ <controller>wcf\acp\page\TrophyCategoryListPage</controller>
+ <parent>wcf.acp.menu.link.trophy</parent>
+ <permissions>admin.trophy.canManageTrophy</permissions>
+ <options>module_trophy</options>
+ </acpmenuitem>
+ <acpmenuitem name="wcf.acp.menu.link.trophy.category.add">
+ <controller>wcf\acp\form\TrophyCategoryAddForm</controller>
+ <parent>wcf.acp.menu.link.trophy.category.list</parent>
+ <permissions>admin.trophy.canManageTrophy</permissions>
+ <options>module_trophy</options>
+ <icon>fa-plus</icon>
+ </acpmenuitem>
+ <!-- /trophy -->
<!-- /user -->
--- /dev/null
+<?php
+namespace wcf\acp\form;
+
+/**
+ * Represents the trophy category add form.
+ *
+ * @author Joshua Ruesweg
+ * @copyright 2001-2017 WoltLab GmbH
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ * @package WoltLabSuite\Core\Acp\Form
+ * @since 3.1
+ */
+class TrophyCategoryAddForm extends AbstractCategoryAddForm {
+ /**
+ * @inheritDoc
+ */
+ public $activeMenuItem = 'wcf.acp.menu.link.trophy.category.add';
+
+ /**
+ * @inheritDoc
+ */
+ public $objectTypeName = 'com.woltlab.wcf.trophy.category';
+
+ /**
+ * @inheritDoc
+ */
+ public $neededModules = ['MODULE_TROPHY'];
+
+ /**
+ * @inheritDoc
+ */
+ public $neededPermissions = ['admin.trophy.canManageTrophy'];
+}
--- /dev/null
+<?php
+namespace wcf\acp\form;
+
+/**
+ * Represents the trophy category edit form.
+ *
+ * @author Joshua Ruesweg
+ * @copyright 2001-2017 WoltLab GmbH
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ * @package WoltLabSuite\Core\Acp\Form
+ * @since 3.1
+ */
+class TrophyCategoryEditForm extends AbstractCategoryEditForm {
+ /**
+ * @inheritDoc
+ */
+ public $activeMenuItem = 'wcf.acp.menu.link.trophy';
+
+ /**
+ * @inheritDoc
+ */
+ public $objectTypeName = 'com.woltlab.wcf.trophy.category';
+
+ /**
+ * @inheritDoc
+ */
+ public $neededModules = ['MODULE_TROPHY'];
+
+ /**
+ * @inheritDoc
+ */
+ public $neededPermissions = ['admin.trophy.canManageTrophy'];
+}
--- /dev/null
+<?php
+namespace wcf\acp\page;
+
+/**
+ * Represents the trophy category list page.
+ *
+ * @author Joshua Ruesweg
+ * @copyright 2001-2017 WoltLab GmbH
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ * @package WoltLabSuite\Core\Acp\Form
+ * @since 3.1
+ */
+class TrophyCategoryListPage extends AbstractCategoryListPage {
+ /**
+ * @inheritDoc
+ */
+ public $activeMenuItem = 'wcf.acp.menu.link.trophy.category.list';
+
+ /**
+ * @inheritDoc
+ */
+ public $objectTypeName = 'com.woltlab.wcf.trophy.category';
+
+ /**
+ * @inheritDoc
+ */
+ public $neededModules = ['MODULE_TROPHY'];
+
+ /**
+ * @inheritDoc
+ */
+ public $neededPermissions = ['admin.trophy.canManageTrophy'];
+}
--- /dev/null
+<?php
+namespace wcf\system\category;
+use wcf\system\WCF;
+
+/**
+ * Trophy category type.
+ *
+ * @author Joshua Ruesweg
+ * @copyright 2001-2017 WoltLab GmbH
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ * @package WoltLabSuite\Core\System\Category
+ * @since 3.1
+ */
+class TrophyCategoryType extends AbstractCategoryType {
+ /**
+ * @inheritDoc
+ */
+ protected $langVarPrefix = 'wcf.trophy.category';
+
+ /**
+ * @inheritDoc
+ */
+ protected $maximumNestingLevel = 0;
+
+ /** @noinspection PhpMissingParentCallCommonInspection */
+ /**
+ * @inheritDoc
+ */
+ public function canAddCategory() {
+ return $this->canEditCategory();
+ }
+
+ /** @noinspection PhpMissingParentCallCommonInspection */
+ /**
+ * @inheritDoc
+ */
+ public function canDeleteCategory() {
+ return $this->canEditCategory();
+ }
+
+ /** @noinspection PhpMissingParentCallCommonInspection */
+ /**
+ * @inheritDoc
+ */
+ public function canEditCategory() {
+ return WCF::getSession()->getPermission('admin.trophy.canManageTrophy');
+ }
+}
<item name="wcf.acp.menu.link.other"><![CDATA[Sonstiges]]></item>
<item name="wcf.acp.menu.item.pageObjectID.error.invalid"><![CDATA[Die eingetragene ID ist ungültig.]]></item>
<item name="wcf.acp.menu.link.contact.settings"><![CDATA[Kontakt-Formular]]></item>
+ <item name="wcf.acp.menu.link.trophy"><![CDATA[Trophäen]]></item>
+ <item name="wcf.acp.menu.link.trophy.category.list"><![CDATA[Kategorien]]></item>
+ <item name="wcf.acp.menu.link.trophy.category.add"><![CDATA[Kategorie hinzufügen]]></item>
</category>
<category name="wcf.acp.notice">
<item name="wcf.acp.menu.link.other"><![CDATA[Other]]></item>
<item name="wcf.acp.menu.item.pageObjectID.error.invalid"><![CDATA[ID is invalid.]]></item>
<item name="wcf.acp.menu.link.contact.settings"><![CDATA[Contact Form]]></item>
+ <item name="wcf.acp.menu.link.trophy"><![CDATA[Trophies]]></item>
+ <item name="wcf.acp.menu.link.trophy.category.list"><![CDATA[Categories]]></item>
+ <item name="wcf.acp.menu.link.trophy.category.add"><![CDATA[Add Category]]></item>
</category>
<category name="wcf.acp.notice">