Merge pull request #5987 from WoltLab/acp-dahsboard-box-hight
[GitHub/WoltLab/WCF.git] / wcfsetup / install / files / lib / system / category / SmileyCategoryType.class.php
CommitLineData
dcc2332d 1<?php
a9229942 2
dcc2332d 3namespace wcf\system\category;
a9229942 4
d2540965
AE
5use wcf\data\category\CategoryEditor;
6use wcf\system\cache\builder\SmileyCacheBuilder;
dcc2332d
MW
7use wcf\system\WCF;
8
9/**
10 * Category implementation for smilies.
a9229942
TD
11 *
12 * @author Tim Duesterhus
13 * @copyright 2001-2019 WoltLab GmbH
14 * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
dcc2332d 15 */
a9229942
TD
16class SmileyCategoryType extends AbstractCategoryType
17{
18 /**
19 * @inheritDoc
20 */
21 protected $langVarPrefix = 'wcf.acp.smiley.category';
22
23 /**
24 * @inheritDoc
25 */
26 protected $hasDescription = false;
27
28 /**
29 * @inheritDoc
30 */
31 protected $maximumNestingLevel = 0;
32
33 /**
34 * @inheritDoc
35 */
36 public function afterDeletion(CategoryEditor $categoryEditor)
37 {
38 SmileyCacheBuilder::getInstance()->reset();
39 }
40
41 /**
42 * @inheritDoc
43 */
44 public function canAddCategory()
45 {
46 return $this->canEditCategory();
47 }
48
49 /**
50 * @inheritDoc
51 */
52 public function canDeleteCategory()
53 {
54 return $this->canEditCategory();
55 }
56
57 /**
58 * @inheritDoc
59 */
60 public function canEditCategory()
61 {
62 return WCF::getSession()->getPermission('admin.content.smiley.canManageSmiley');
63 }
dcc2332d 64}