--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<data xsi:schemaLocation="http://www.woltlab.com http://www.woltlab.com/XSD/vortex/userProfileMenu.xsd" xmlns="http://www.woltlab.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <import>
+ <userprofilemenuitem name="recentActivity">
+ <classname>wcf\system\menu\user\profile\content\RecentActivityUserProfileMenuContent</classname>
+ <showorder>1</showorder>
+ </userprofilemenuitem>
+ <userprofilemenuitem name="wall">
+ <classname>wcf\system\menu\user\profile\content\CommentUserProfileMenuContent</classname>
+ <showorder>1</showorder>
+ <options>module_user_profile_wall</options>
+ </userprofilemenuitem>
+ <userprofilemenuitem name="likes">
+ <classname>wcf\system\menu\user\profile\content\LikesUserProfileMenuContent</classname>
+ <options>module_like</options>
+ <showorder>2</showorder>
+ </userprofilemenuitem>
+ <userprofilemenuitem name="about">
+ <classname>wcf\system\menu\user\profile\content\AboutUserProfileMenuContent</classname>
+ <showorder>3</showorder>
+ </userprofilemenuitem>
+ </import>
+</data>
$dataContainer = $form->getNodeById('data');
$dataContainer->appendChildren([
- TextFormField::create('name')
- ->label('wcf.acp.pip.userProfileMenu.name')
- ->description('wcf.acp.pip.userProfileMenu.name.description')
+ TextFormField::create('menuItem')
+ ->objectProperty('name')
+ ->label('wcf.acp.pip.userProfileMenu.eventName')
+ ->description('wcf.acp.pip.userProfileMenu.eventName.description')
->required()
->addValidator(new FormFieldValidator('format', function(TextFormField $formField) {
if (!preg_match('~^[a-z][A-z]+$~', $formField->getValue())) {
$formField->addValidationError(
new FormFieldValidationError(
'format',
- 'wcf.acp.pip.userProfileMenu.name.error.format'
+ 'wcf.acp.pip.userProfileMenu.menuItem.error.format'
)
);
}
$formField->addValidationError(
new FormFieldValidationError(
'notUnique',
- 'wcf.acp.pip.userProfileMenu.name.error.notUnique'
+ 'wcf.acp.pip.userProfileMenu.menuItem.error.notUnique'
)
);
}
*/
protected function setEntryListKeys(IDevtoolsPipEntryList $entryList) {
$entryList->setKeys([
- 'name' => 'wcf.acp.pip.userProfileMenu.name',
- 'className' => 'wcf.acp.pip.userProfileMenu.className'
+ 'menuItem' => 'wcf.acp.pip.userProfileMenu.menuItem',
+ 'className' => 'wcf.form.field.className'
]);
}
$userProfileMenuItem = $document->createElement('userprofilemenuitem');
$userProfileMenuItem->setAttribute('name', $data['name']);
- $userProfileMenuItem->appendChild($document->createElement('classname', $data['className']));
+ $userProfileMenuItem->appendChild($document->createElement('classname', $data['classname']));
foreach (['options', 'permissions', 'showorder'] as $optionalElement) {
if (!empty($data[$optionalElement])) {