-
Notifications
You must be signed in to change notification settings - Fork 147
Expand file tree
/
Copy pathBoxListPage.class.php
More file actions
65 lines (55 loc) · 1.44 KB
/
BoxListPage.class.php
File metadata and controls
65 lines (55 loc) · 1.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<?php
namespace wcf\acp\page;
use wcf\page\AbstractGridViewPage;
use wcf\system\gridView\AbstractGridView;
use wcf\system\gridView\admin\BoxGridView;
use wcf\system\language\LanguageFactory;
use wcf\system\WCF;
/**
* Shows a list of boxes.
*
* @author Olaf Braun, Marcel Werk
* @copyright 2001-2025 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
* @since 3.0
*
* @property BoxGridView $gridView
*/
class BoxListPage extends AbstractGridViewPage
{
/**
* @inheritDoc
*/
public $activeMenuItem = 'wcf.acp.menu.link.cms.box.list';
/**
* @inheritDoc
*/
public $neededPermissions = ['admin.content.cms.canManageBox'];
/**
* display 'Add Box' dialog on load
* @var int
*/
public $showBoxAddDialog = 0;
#[\Override]
public function readParameters()
{
parent::readParameters();
if (!empty($_REQUEST['showBoxAddDialog'])) {
$this->showBoxAddDialog = 1;
}
}
#[\Override]
public function assignVariables()
{
parent::assignVariables();
WCF::getTPL()->assign([
'availableLanguages' => LanguageFactory::getInstance()->getLanguages(),
'showBoxAddDialog' => $this->showBoxAddDialog,
]);
}
#[\Override]
protected function createGridViewController(): AbstractGridView
{
return new BoxGridView();
}
}