/**
* @inheritDoc
*/
- public function getEntries(): array {
+ public function getEntries() {
return $this->entries;
}
/**
* @inheritDoc
*/
- public function getKeys(): array {
+ public function getKeys() {
if ($this->keys === null) {
throw new \BadMethodCallException("No keys have been set.");
}
*
* @return array
*/
- public function getEntries(): array;
+ public function getEntries();
/**
* Returns the expected keys of the entries that can be used to display the
* @return array
* @throws \BadMethodCallException if no keys have been set
*/
- public function getKeys(): array;
+ public function getKeys();
/**
* Sets the keys of the entries that can be used to display the entry list
* @param string $identifier
* @return string new identifier
*/
- public function editEntry(IFormDocument $form, string $identifier): string {
+ public function editEntry(IFormDocument $form, string $identifier) {
$xml = $this->getProjectXml();
$document = $xml->getDocument();
*
* @return string
*/
- public function getAdditionalTemplateCode(): string {
+ public function getAdditionalTemplateCode() {
return '';
}
* @param string $value
* @return string
*/
- protected function getAutoCdataValue(string $value): string {
+ protected function getAutoCdataValue(string $value) {
if (strpos('<', $value) !== false || strpos('>', $value) !== false || strpos('&', $value) !== false) {
$value = '<![CDATA[' . StringUtil::escapeCDATA($value) . ']]>';
}
* @param bool $saveData is `true` if data is intended to be saved and otherwise `false`
* @return array
*/
- abstract protected function getElementData(\DOMElement $element, bool $saveData = false): array;
+ abstract protected function getElementData(\DOMElement $element, bool $saveData = false);
/**
* Returns the identifier of the given `import` element.
* @param \DOMElement $element
* @return string
*/
- abstract protected function getElementIdentifier(\DOMElement $element): string;
+ abstract protected function getElementIdentifier(\DOMElement $element);
/**
* Returns the xml code of an empty xml file with the appropriate structure
*
* @return string
*/
- protected function getEmptyXml(): string {
+ protected function getEmptyXml() {
$xsdFilename = $this->getXsdFilename();
return <<<XML
*
* @return string
*/
- protected function getXsdFilename(): string {
+ protected function getXsdFilename() {
$classNamePieces = explode('\\', get_class($this));
return lcfirst(str_replace('PackageInstallationPlugin', '', array_pop($classNamePieces)));
*
* @return IDevtoolsPipEntryList
*/
- public function getEntryList(): IDevtoolsPipEntryList {
+ public function getEntryList() {
$xml = $this->getProjectXml();
$xpath = $xml->xpath();
*
* @return string[]
*/
- public function getEntryTypes(): array {
+ public function getEntryTypes() {
return [];
}
*
* @return XML
*/
- protected function getProjectXml(): XML {
+ protected function getProjectXml() {
$fileLocation = $this->getXmlFileLocation();
$xml = new XML();
*
* @return string
*/
- protected function getXmlFileLocation(): string {
+ protected function getXmlFileLocation() {
/** @var DevtoolsProject $project */
$project = $this->installation->getProject();
* @param IFormDocument $document
* @return bool
*/
- public function setEntryData(string $identifier, IFormDocument $document): bool {
+ public function setEntryData(string $identifier, IFormDocument $document) {
$xml = $this->getProjectXml();
$element = $this->getElementByIdentifier($xml, $identifier);
* @param IFormDocument $form
* @return \DOMElement
*/
- abstract protected function writeEntry(\DOMDocument $document, IFormDocument $form): \DOMElement;
+ abstract protected function writeEntry(\DOMDocument $document, IFormDocument $form);
}
*
* @return int[]
*/
- public function getPackageIDs(): array {
+ public function getPackageIDs() {
return $this->__packageIDs;
}
*
* @throws \InvalidArgumentException if the given package ids are invalid
*/
- public function packageIDs(array $packageIDs): OptionFormField {
+ public function packageIDs(array $packageIDs) {
foreach ($packageIDs as $packageID) {
if (PackageCache::getInstance()->getPackage($packageID) === null) {
throw new \InvalidArgumentException("Unknown package with id '{$packageID}'.");
/**
* @inheritDoc
*/
- protected static function getDefaultId(): string {
+ protected static function getDefaultId() {
return 'options';
}
}
*
* @return int[]
*/
- public function getPackageIDs(): array {
+ public function getPackageIDs() {
return $this->__packageIDs;
}
*
* @throws \InvalidArgumentException if the given package ids are invalid
*/
- public function packageIDs(array $packageIDs): UserGroupOptionFormField {
+ public function packageIDs(array $packageIDs) {
foreach ($packageIDs as $packageID) {
if (PackageCache::getInstance()->getPackage($packageID) === null) {
throw new \InvalidArgumentException("Unknown package with id '{$packageID}'.");
/**
* @inheritDoc
*/
- protected static function getDefaultId(): string {
+ protected static function getDefaultId() {
return 'permissions';
}
}
* @inheritDoc
* @since 3.2
*/
- public function getEntryTypes(): array {
+ public function getEntryTypes() {
return ['options', 'categories'];
}
* @inheritDoc
* @since 3.2
*/
- protected function getElementData(\DOMElement $element, bool $saveData = false): array {
+ protected function getElementData(\DOMElement $element, bool $saveData = false) {
$data = [
'name' => $element->getAttribute('name'),
'packageID' => $this->installation->getPackage()->packageID,
* @inheritDoc
* @since 3.2
*/
- public function getElementIdentifier(\DOMElement $element): string {
+ public function getElementIdentifier(\DOMElement $element) {
$elementData = $this->getElementData($element);
return sha1($elementData['objectType'] . '/' . $elementData['name']);
* @inheritDoc
* @since 3.2
*/
- protected function getXsdFilename(): string {
+ protected function getXsdFilename() {
return 'aclOption';
}
* @inheritDoc
* @since 3.2
*/
- protected function writeEntry(\DOMDocument $document, IFormDocument $form): \DOMElement {
+ protected function writeEntry(\DOMDocument $document, IFormDocument $form) {
$formData = $form->getData()['data'];
switch ($this->entryType) {
// icons are only available for menu items on the first or fourth level
// thus the parent menu item must be on zeroth level (no parent menu item)
// or on the third level
- $iconParentMenuItems = array_keys(array_filter($menuItemLevels, function(int $value): bool {
+ $iconParentMenuItems = array_keys(array_filter($menuItemLevels, function(int $value) {
return $value === 0 || $value == 3;
}));
// menu items on the first and second level do not support links,
// thus the parent menu item must be at least on the second level
// for the menu item to support links
- $menuItemsSupportingLinks = array_keys(array_filter($menuItemLevels, function(int $menuItemLevel): bool {
+ $menuItemsSupportingLinks = array_keys(array_filter($menuItemLevels, function(int $menuItemLevel) {
return $menuItemLevel >= 2;
}));
* @inheritDoc
* @since 3.2
*/
- protected function getElementData(\DOMElement $element, bool $saveData = false): array {
+ protected function getElementData(\DOMElement $element, bool $saveData = false) {
$data = parent::getElementData($element);
$icon = $element->getElementsByTagName('icon')->item(0);
* @inheritDoc
* @since 3.2
*/
- protected function writeEntry(\DOMDocument $document, IFormDocument $form): \DOMElement {
+ protected function writeEntry(\DOMDocument $document, IFormDocument $form) {
$formData = $form->getData()['data'];
$menuItem = parent::writeEntry($document, $form);
* @inheritDoc
* @since 3.2
*/
- protected function getElementData(\DOMElement $element, bool $saveData = false): array {
+ protected function getElementData(\DOMElement $element, bool $saveData = false) {
$data = [
'className' => $element->getElementsByTagName('classname')->item(0)->nodeValue,
'packageID' => $this->installation->getPackage()->packageID,
* @inheritDoc
* @since 3.2
*/
- public function getElementIdentifier(\DOMElement $element): string {
+ public function getElementIdentifier(\DOMElement $element) {
return $element->getAttribute('name');
}
* @inheritDoc
* @since 3.2
*/
- protected function writeEntry(\DOMDocument $document, IFormDocument $form): \DOMElement {
+ protected function writeEntry(\DOMDocument $document, IFormDocument $form) {
$data = $form->getData()['data'];
$acpSearchProvider = $document->createElement('acpsearchprovider');
->objectProperty('parent')
->label('wcf.acp.pip.abstractMenu.parentMenuItem')
->filterable()
- ->options(function(): array {
+ ->options(function() {
$menuStructure = $this->getMenuStructureData()['structure'];
$options = [[
'value' => ''
]];
- $buildOptions = function(string $parent = '', int $depth = 0) use ($menuStructure, &$buildOptions): array {
+ $buildOptions = function(string $parent = '', int $depth = 0) use ($menuStructure, &$buildOptions) {
// only consider menu items until the third level (thus only parent
// menu items until the second level) as potential parent menu items
if ($depth > 2) {
* @inheritDoc
* @since 3.2
*/
- protected function getElementData(\DOMElement $element, bool $saveData = false): array {
+ protected function getElementData(\DOMElement $element, bool $saveData = false) {
$data = [
'menuItem' => $element->getAttribute('name'),
'packageID' => $this->installation->getPackage()->packageID
* @inheritDoc
* @since 3.2
*/
- public function getElementIdentifier(\DOMElement $element): string {
+ public function getElementIdentifier(\DOMElement $element) {
return $element->getAttribute('name');
}
*
* @return array
*/
- protected function getMenuStructureData(): array {
+ protected function getMenuStructureData() {
// replace `Editor` with `List`
$listClassName = substr($this->className, 0, -6) . 'List';
// build array containing the ACP menu items saved in the database
// in the order as they would be displayed in the ACP
- $buildPositions = function(string $parent = '') use ($menuItemStructure, &$buildPositions): array {
+ $buildPositions = function(string $parent = '') use ($menuItemStructure, &$buildPositions) {
$positions = [];
foreach ($menuItemStructure[$parent] as $menuItem) {
// only consider menu items of the current package for positions
* @inheritDoc
* @since 3.2
*/
- protected function writeEntry(\DOMDocument $document, IFormDocument $form): \DOMElement {
+ protected function writeEntry(\DOMDocument $document, IFormDocument $form) {
$formData = $form->getData()['data'];
$menuItem = $document->createElement($this->tagName);
* @inheritDoc
* @since 3.2
*/
- protected function getElementData(\DOMElement $element, bool $saveData = false): array {
+ protected function getElementData(\DOMElement $element, bool $saveData = false) {
$data = [
'actionClassName' => $element->getElementsByTagName('actionclassname')->item(0)->nodeValue,
'actionName' => $element->getAttribute('name'),
* @inheritDoc
* @since 3.2
*/
- public function getElementIdentifier(\DOMElement $element): string {
+ public function getElementIdentifier(\DOMElement $element) {
return sha1(
$element->getElementsByTagName('actionclassname')->item(0)->nodeValue . '/' .
$element->getAttribute('name')
* @inheritDoc
* @since 3.2
*/
- protected function writeEntry(\DOMDocument $document, IFormDocument $form): \DOMElement {
+ protected function writeEntry(\DOMDocument $document, IFormDocument $form) {
$formData = $form->getData();
$data = $formData['data'];
* @inheritDoc
* @since 3.2
*/
- protected function getElementData(\DOMElement $element, bool $saveData = false): array {
+ protected function getElementData(\DOMElement $element, bool $saveData = false) {
return [
'objectName' => $element->getElementsByTagName('objectname')->item(0)->nodeValue,
'packageID' => $this->installation->getPackage()->packageID
* @inheritDoc
* @since 3.2
*/
- public function getElementIdentifier(\DOMElement $element): string {
+ public function getElementIdentifier(\DOMElement $element) {
return sha1($element->getElementsByTagName('objectname')->item(0)->nodeValue);
}
* @inheritDoc
* @since 3.2
*/
- protected function writeEntry(\DOMDocument $document, IFormDocument $form): \DOMElement {
+ protected function writeEntry(\DOMDocument $document, IFormDocument $form) {
$data = $form->getData()['data'];
$coreObject = $document->createElement($this->tagName);
* @inheritDoc
* @since 3.2
*/
- protected function getElementData(\DOMElement $element, bool $saveData = false): array {
+ protected function getElementData(\DOMElement $element, bool $saveData = false) {
$data = [
'className' => $element->getElementsByTagName('classname')->item(0)->nodeValue,
'cronjobName' => $element->getAttribute('name'),
* @inheritDoc
* @since 3.2
*/
- public function getElementIdentifier(\DOMElement $element): string {
+ public function getElementIdentifier(\DOMElement $element) {
return $element->getAttribute('name');
}
* @inheritDoc
* @since 3.2
*/
- protected function writeEntry(\DOMDocument $document, IFormDocument $form): \DOMElement {
+ protected function writeEntry(\DOMDocument $document, IFormDocument $form) {
$data = $form->getData();
$formData = $form->getData()['data'];
* @inheritDoc
* @since 3.2
*/
- protected function getElementData(\DOMElement $element, bool $saveData = false): array {
+ protected function getElementData(\DOMElement $element, bool $saveData = false) {
$data = [
'eventClassName' => $element->getElementsByTagName('eventclassname')->item(0)->nodeValue,
'eventName' => StringUtil::normalizeCsv($element->getElementsByTagName('eventname')->item(0)->nodeValue),
* @inheritDoc
* @since 3.2
*/
- public function getElementIdentifier(\DOMElement $element): string {
+ public function getElementIdentifier(\DOMElement $element) {
return $element->getAttribute('name');
}
* @inheritDoc
* @since 3.2
*/
- protected function writeEntry(\DOMDocument $document, IFormDocument $form): \DOMElement {
+ protected function writeEntry(\DOMDocument $document, IFormDocument $form) {
$data = $form->getData()['data'];
$eventListener = $document->createElement($this->tagName);
* @inheritDoc
* @since 3.2
*/
- protected function getElementData(\DOMElement $element, bool $saveData = false): array {
+ protected function getElementData(\DOMElement $element, bool $saveData = false) {
$data = [
'name' => $element->getAttribute('name'),
'packageID' => $this->installation->getPackage()->packageID,
* @inheritDoc
* @since 3.2
*/
- public function getElementIdentifier(\DOMElement $element): string {
+ public function getElementIdentifier(\DOMElement $element) {
return $element->getAttribute('name');
}
* @inheritDoc
* @since 3.2
*/
- protected function writeEntry(\DOMDocument $document, IFormDocument $form): \DOMElement {
+ protected function writeEntry(\DOMDocument $document, IFormDocument $form) {
$data = $form->getData()['data'];
$provider = $document->createElement($this->tagName);
->label('wcf.acp.pip.menuItem.menu')
->description('wcf.acp.pip.menuItem.menu.description')
->required()
- ->options(function() use ($menuList): array {
+ ->options(function() use ($menuList) {
$options = [];
foreach ($menuList as $menu) {
$options[$menu->identifier] = $menu->identifier;
->description('wcf.acp.pip.menuItem.page.description')
->required()
->filterable()
- ->options(function(): array {
+ ->options(function() {
$pageNodeList = (new PageNodeTree())->getNodeList();
$nestedOptions = [[
SingleSelectionFormField::create('parentMenuItem' . $menu->menuID)
->objectProperty('parent')
->label('wcf.acp.pip.menuItem.parentMenuItem')
- ->options(function() use($menu): array {
+ ->options(function() use($menu) {
$options = [[
'depth' => 0,
'label' => 'wcf.global.noSelection',
* @inheritDoc
* @since 3.2
*/
- protected function getElementData(\DOMElement $element, bool $saveData = false): array {
+ protected function getElementData(\DOMElement $element, bool $saveData = false) {
$data = [
'identifier' => $element->getAttribute('identifier'),
'packageID' => $this->installation->getPackageID(),
* @inheritDoc
* @since 3.2
*/
- public function getElementIdentifier(\DOMElement $element): string {
+ public function getElementIdentifier(\DOMElement $element) {
return $element->getAttribute('identifier');
}
* @inheritDoc
* @since 3.2
*/
- protected function writeEntry(\DOMDocument $document, IFormDocument $form): \DOMElement {
+ protected function writeEntry(\DOMDocument $document, IFormDocument $form) {
$formData = $form->getData();
$data = $formData['data'];
* @inheritDoc
* @since 3.2
*/
- public function getAdditionalTemplateCode(): string {
+ public function getAdditionalTemplateCode() {
return WCF::getTPL()->fetch('__menuPipGui');
}
MultipleSelectionFormField::create('boxVisibilityExceptions')
->label('wcf.acp.pip.menu.boxVisibilityExceptions.hiddenEverywhere')
->filterable()
- ->options(function(): array {
+ ->options(function() {
$pageNodeList = (new PageNodeTree())->getNodeList();
$nestedOptions = [];
* @inheritDoc
* @since 3.2
*/
- protected function getElementData(\DOMElement $element, bool $saveData = false): array {
+ protected function getElementData(\DOMElement $element, bool $saveData = false) {
$data = [
'identifier' => $element->getAttribute('identifier'),
'packageID' => $this->installation->getPackageID(),
* @inheritDoc
* @since 3.2
*/
- public function getElementIdentifier(\DOMElement $element): string {
+ public function getElementIdentifier(\DOMElement $element) {
return $element->getAttribute('identifier');
}
* @inheritDoc
* @since 3.2
*/
- protected function writeEntry(\DOMDocument $document, IFormDocument $form): \DOMElement {
+ protected function writeEntry(\DOMDocument $document, IFormDocument $form) {
$formData = $form->getData();
if ($formData['data']['identifier'] === 'com.woltlab.wcf.MainMenu') {
* @inheritDoc
* @since 3.2
*/
- protected function getElementData(\DOMElement $element, bool $saveData = false): array {
+ protected function getElementData(\DOMElement $element, bool $saveData = false) {
$data = [
'definitionName' => $element->getElementsByTagName('name')->item(0)->nodeValue,
'packageID' => $this->installation->getPackage()->packageID
* @inheritDoc
* @since 3.2
*/
- public function getElementIdentifier(\DOMElement $element): string {
+ public function getElementIdentifier(\DOMElement $element) {
return $element->getElementsByTagName('name')->item(0)->nodeValue;
}
* @inheritDoc
* @since 3.2
*/
- protected function writeEntry(\DOMDocument $document, IFormDocument $form): \DOMElement {
+ protected function writeEntry(\DOMDocument $document, IFormDocument $form) {
$data = $form->getData()['data'];
$definition = $document->createElement('definition');
* @inheritDoc
* @since 3.2
*/
- public function getAdditionalTemplateCode(): string {
+ public function getAdditionalTemplateCode() {
return WCF::getTPL()->fetch('__objectTypePipGui', 'wcf', [
'definitionNames' => $this->definitionNames,
'definitionInterfaces' => $this->definitionInterfaces
* @inheritDoc
* @since 3.2
*/
- protected function getElementData(\DOMElement $element, bool $saveData = false): array {
+ protected function getElementData(\DOMElement $element, bool $saveData = false) {
$data = [
'definitionID' => $this->getDefinitionID($element->getElementsByTagName('definitionname')->item(0)->nodeValue),
'objectType' => $element->getElementsByTagName('name')->item(0)->nodeValue,
* @inheritDoc
* @since 3.2
*/
- public function getElementIdentifier(\DOMElement $element): string {
+ public function getElementIdentifier(\DOMElement $element) {
return sha1(
$element->getElementsByTagName('name')->item(0)->nodeValue . '/' .
$element->getElementsByTagName('definitionname')->item(0)->nodeValue
* @inheritDoc
* @since 3.2
*/
- protected function getEmptyXml(): string {
+ protected function getEmptyXml() {
return <<<XML
<?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/vortex/objectType.xsd">
* @inheritDoc
* @since 3.2
*/
- public function getEntryList(): IDevtoolsPipEntryList {
+ public function getEntryList() {
$xml = $this->getProjectXml();
$xpath = $xml->xpath();
* @return FormContainer
* @since 3.2
*/
- public function getObjectTypeDefinitionDataContainer(IFormDocument $form, string $definitionName): FormContainer {
+ public function getObjectTypeDefinitionDataContainer(IFormDocument $form, string $definitionName) {
/** @var SingleSelectionFormField $definitionNameField */
$definitionIDField = $form->getNodeById('definitionID');
* @inheritDoc
* @since 3.2
*/
- protected function writeEntry(\DOMDocument $document, IFormDocument $form): \DOMElement {
+ protected function writeEntry(\DOMDocument $document, IFormDocument $form) {
$type = $document->createElement('type');
foreach ($form->getData()['data'] as $key => $value) {
if ($key === 'definitionID') {
* @param string $databaseTableName name of the database table that stores the conditioned objects
* @return TextFormField
*/
- public function getIntegerConditionPropertyNameField(TextFormField $classNameField, string $conditionClass, string $id, string $languageItemPrefix, string $databaseTableName): TextFormField {
+ public function getIntegerConditionPropertyNameField(TextFormField $classNameField, string $conditionClass, string $id, string $languageItemPrefix, string $databaseTableName) {
return TextFormField::create($id)
->objectProperty('propertyname')
->label($languageItemPrefix . '.propertyName')
* @param int $minimumSegmentCount minimum number of dot-separated segments
* @return FormFieldValidator
*/
- public static function getObjectTypeAlikeValueValidator(string $languageItemPrefix, int $minimumSegmentCount = 4): FormFieldValidator {
+ public static function getObjectTypeAlikeValueValidator(string $languageItemPrefix, int $minimumSegmentCount = 4) {
return new FormFieldValidator('format', function(TextFormField $formField) use ($languageItemPrefix, $minimumSegmentCount) {
if ($formField->getValue()) {
$segments = explode('.', $formField->getValue());
* @inheritDoc
* @since 3.2
*/
- protected function getElementData(\DOMElement $element, bool $saveData = false): array {
+ protected function getElementData(\DOMElement $element, bool $saveData = false) {
return [
'className' => $element->nodeValue,
'pluginName' => $element->getAttribute('name'),
* @inheritDoc
* @since 3.2
*/
- public function getElementIdentifier(\DOMElement $element): string {
+ public function getElementIdentifier(\DOMElement $element) {
return $element->getAttribute('name');
}
* @inheritDoc
* @since 3.2
*/
- protected function writeEntry(\DOMDocument $document, IFormDocument $form): \DOMElement {
+ protected function writeEntry(\DOMDocument $document, IFormDocument $form) {
/** @var TextFormField $className */
$className = $form->getNodeById('className');
/** @var TextFormField $pluginName */
->label('wcf.acp.pip.page.parent')
->required()
->filterable()
- ->options(function(): array {
+ ->options(function() {
$pageNodeList = (new PageNodeTree())->getNodeList();
$nestedOptions = [[
* @inheritDoc
* @since 3.2
*/
- protected function getElementData(\DOMElement $element, bool $saveData = false): array {
+ protected function getElementData(\DOMElement $element, bool $saveData = false) {
$data = [
'identifier' => $element->getAttribute('identifier'),
'originIsSystem' => 1,
* @inheritDoc
* @since 3.2
*/
- public function getElementIdentifier(\DOMElement $element): string {
+ public function getElementIdentifier(\DOMElement $element) {
return $element->getAttribute('identifier');
}
* @inheritDoc
* @since 3.2
*/
- protected function writeEntry(\DOMDocument $document, IFormDocument $form): \DOMElement {
+ protected function writeEntry(\DOMDocument $document, IFormDocument $form) {
$formData = $form->getData();
$data = $formData['data'];
* @inheritDoc
* @since 3.2
*/
- protected function getElementData(\DOMElement $element, bool $saveData = false): array {
+ protected function getElementData(\DOMElement $element, bool $saveData = false) {
return [
'environment' => $element->getElementsByTagName('environment')->item(0)->nodeValue,
'eventName' => $element->getElementsByTagName('eventname')->item(0)->nodeValue,
* @inheritDoc
* @since 3.2
*/
- public function getElementIdentifier(\DOMElement $element): string {
+ public function getElementIdentifier(\DOMElement $element) {
return sha1(
$element->getElementsByTagName('templatename')->item(0)->nodeValue . '/' .
$element->getElementsByTagName('eventname')->item(0)->nodeValue . '/' .
* @inheritDoc
* @since 3.2
*/
- protected function writeEntry(\DOMDocument $document, IFormDocument $form): \DOMElement {
+ protected function writeEntry(\DOMDocument $document, IFormDocument $form) {
$data = $form->getData()['data'];
$listener = $document->createElement($this->tagName);
// menu items on the first and second level do not support links,
// thus the parent menu item must be at least on the second level
// for the menu item to support links
- $menuItemsSupportingLinks = array_keys(array_filter($menuItemLevels, function(int $menuItemLevel): bool {
+ $menuItemsSupportingLinks = array_keys(array_filter($menuItemLevels, function(int $menuItemLevel) {
return $menuItemLevel >= 2;
}));
* @inheritDoc
* @since 3.2
*/
- protected function getElementData(\DOMElement $element, bool $saveData = false): array {
+ protected function getElementData(\DOMElement $element, bool $saveData = false) {
$data = parent::getElementData($element);
$className = $element->getElementsByTagName('classname')->item(0);
* @inheritDoc
* @since 3.2
*/
- protected function writeEntry(\DOMDocument $document, IFormDocument $form): \DOMElement {
+ protected function writeEntry(\DOMDocument $document, IFormDocument $form) {
$formData = $form->getData()['data'];
$menuItem = parent::writeEntry($document, $form);
->label('wcf.acp.pip.userNotificationEvent.objectType')
->description('wcf.acp.pip.userNotificationEvent.objectType.description')
->required()
- ->options(function(): array {
+ ->options(function() {
$options = [];
foreach (ObjectTypeCache::getInstance()->getObjectTypes('com.woltlab.wcf.notification.objectType') as $objectType) {
$options[$objectType->objectType] = $objectType->objectType;
* @inheritDoc
* @since 3.2
*/
- protected function getElementData(\DOMElement $element, bool $saveData = false): array {
+ protected function getElementData(\DOMElement $element, bool $saveData = false) {
$data = [
'className' => $element->getElementsByTagName('classname')->item(0)->nodeValue,
'objectTypeID' => $this->getObjectTypeID($element->getElementsByTagName('objecttype')->item(0)->nodeValue),
* @inheritDoc
* @since 3.2
*/
- public function getElementIdentifier(\DOMElement $element): string {
+ public function getElementIdentifier(\DOMElement $element) {
return sha1(
$element->getElementsByTagName('name')->item(0)->nodeValue . '/' .
$element->getElementsByTagName('objecttype')->item(0)->nodeValue
* @inheritDoc
* @since 3.2
*/
- protected function writeEntry(\DOMDocument $document, IFormDocument $form): \DOMElement {
+ protected function writeEntry(\DOMDocument $document, IFormDocument $form) {
$data = $form->getData()['data'];
$event = $document->createElement($this->tagName);
* @inheritDoc
* @since 3.2
*/
- protected function getElementData(\DOMElement $element, bool $saveData = false): array {
+ protected function getElementData(\DOMElement $element, bool $saveData = false) {
$data = [
'className' => $element->getElementsByTagName('classname')->item(0)->nodeValue,
'menuItem' => $element->getAttribute('name'),
* @inheritDoc
* @since 3.2
*/
- public function getElementIdentifier(\DOMElement $element): string {
+ public function getElementIdentifier(\DOMElement $element) {
return $element->getAttribute('name');
}
* @inheritDoc
* @since 3.2
*/
- protected function writeEntry(\DOMDocument $document, IFormDocument $form): \DOMElement {
+ protected function writeEntry(\DOMDocument $document, IFormDocument $form) {
$data = $form->getData()['data'];
$userProfileMenuItem = $document->createElement('userprofilemenuitem');