Skip to content

ACP Menu Package Installation Plugin#

Registers new ACP menu items.

Components#

Each item is described as an <acpmenuitem> element with the mandatory attribute name.

<parent>#

Optional

The item’s parent item.

<showorder>#

Optional

Specifies the order of this item within the parent item.

<controller>#

The fully qualified class name of the target controller. If not specified this item serves as a category.

Additional components if <controller> is set, the full external link otherwise.

<icon>#

Use an icon only for top-level and 4th-level items.

Name of the Font Awesome icon class.

<options>#

Optional

The options element can contain a comma-separated list of options of which at least one needs to be enabled for the tab to be shown.

<permissions>#

Optional

The permissions element can contain a comma-separated list of permissions of which the active user needs to have at least one for the tab to be shown.

Example#

acpMenu.xml
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?xml version="1.0" encoding="UTF-8"?>
<data xmlns="http://www.woltlab.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.woltlab.com http://www.woltlab.com/XSD/2019/acpMenu.xsd">
    <import>
        <acpmenuitem name="foo.acp.menu.link.example">
            <parent>wcf.acp.menu.link.application</parent>
        </acpmenuitem>

        <acpmenuitem name="foo.acp.menu.link.example.list">
            <controller>foo\acp\page\ExampleListPage</controller>
            <parent>foo.acp.menu.link.example</parent>
            <permissions>admin.foo.canManageExample</permissions>
            <showorder>1</showorder>
        </acpmenuitem>

        <acpmenuitem name="foo.acp.menu.link.example.add">
            <controller>foo\acp\form\ExampleAddForm</controller>
            <parent>foo.acp.menu.link.example.list</parent>
            <permissions>admin.foo.canManageExample</permissions>
            <icon>fa-plus</icon>
        </acpmenuitem>
    </import>
</data>

Last update: 2021-04-23