Merge branch '3.0'
[GitHub/WoltLab/WCF.git] / wcfsetup / install / files / lib / system / category / MediaCategoryType.class.php
1 <?php
2 namespace wcf\system\category;
3 use wcf\system\WCF;
4
5 /**
6 * Category implementation for media files.
7 *
8 * @author Matthias Schmidt
9 * @copyright 2001-2018 WoltLab GmbH
10 * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
11 * @package WoltLabSuite\Core\System\Category
12 * @since 3.1
13 */
14 class MediaCategoryType extends AbstractCategoryType {
15 /**
16 * @inheritDoc
17 */
18 protected $langVarPrefix = 'wcf.media.category';
19
20 /**
21 * @inheritDoc
22 */
23 protected $hasDescription = false;
24
25 /**
26 * @inheritDoc
27 */
28 protected $maximumNestingLevel = 2;
29
30 /**
31 * @inheritDoc
32 */
33 public function canAddCategory() {
34 return WCF::getSession()->getPermission('admin.content.cms.canManageMedia');
35 }
36
37 /**
38 * @inheritDoc
39 */
40 public function canDeleteCategory() {
41 return WCF::getSession()->getPermission('admin.content.cms.canManageMedia');
42 }
43
44 /**
45 * @inheritDoc
46 */
47 public function canEditCategory() {
48 return WCF::getSession()->getPermission('admin.content.cms.canManageMedia');
49 }
50 }