Explicitly implement `IDefaultValueDatabaseTableColumn` in supported column types
[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>
15 * @package WoltLabSuite\Core\System\Category
dcc2332d 16 */
a9229942
TD
17class SmileyCategoryType extends AbstractCategoryType
18{
19 /**
20 * @inheritDoc
21 */
22 protected $langVarPrefix = 'wcf.acp.smiley.category';
23
24 /**
25 * @inheritDoc
26 */
27 protected $hasDescription = false;
28
29 /**
30 * @inheritDoc
31 */
32 protected $maximumNestingLevel = 0;
33
34 /**
35 * @inheritDoc
36 */
37 public function afterDeletion(CategoryEditor $categoryEditor)
38 {
39 SmileyCacheBuilder::getInstance()->reset();
40 }
41
42 /**
43 * @inheritDoc
44 */
45 public function canAddCategory()
46 {
47 return $this->canEditCategory();
48 }
49
50 /**
51 * @inheritDoc
52 */
53 public function canDeleteCategory()
54 {
55 return $this->canEditCategory();
56 }
57
58 /**
59 * @inheritDoc
60 */
61 public function canEditCategory()
62 {
63 return WCF::getSession()->getPermission('admin.content.smiley.canManageSmiley');
64 }
dcc2332d 65}