User Menu Package Installation Plugin#
Registers new user menu items.
Components#
Each item is described as an <usermenuitem>
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.
<link>
#
Additional components if <controller>
is set,
the full external link otherwise.
<iconclassname>
#
Use an icon only for top-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 menu item 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 menu item to be shown.
<classname>
#
The name of the class providing the user menu item’s behaviour,
the class has to implement the wcf\system\menu\user\IUserMenuItemProvider
interface.
Example#
<?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/userMenu.xsd">
<import>
<usermenuitem name="wcf.user.menu.foo">
<iconclassname>fa-home</iconclassname>
</usermenuitem>
<usermenuitem name="wcf.user.menu.foo.bar">
<controller>wcf\page\FooBarListPage</controller>
<parent>wcf.user.menu.foo</parent>
<permissions>user.foo.canBar</permissions>
<classname>wcf\system\menu\user\FooBarMenuItemProvider</classname>
</usermenuitem>
<usermenuitem name="wcf.user.menu.foo.baz">
<controller>wcf\page\FooBazListPage</controller>
<parent>wcf.user.menu.foo</parent>
<permissions>user.foo.canBaz</permissions>
<options>module_foo_bar</options>
</usermenuitem>
</import>
</data>