namespace wcf\system\package\plugin;
use wcf\data\menu\item\MenuItem;
use wcf\data\menu\item\MenuItemEditor;
+use wcf\system\devtools\pip\IIdempotentPackageInstallationPlugin;
use wcf\system\exception\SystemException;
use wcf\system\WCF;
* Installs, updates and deletes menu items.
*
* @author Alexander Ebert
- * @copyright 2001-2016 WoltLab GmbH
+ * @copyright 2001-2017 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package com.woltlab.wcf
- * @subpackage acp.package.plugin
- * @category Community Framework
- * @since 2.2
+ * @package WoltLabSuite\Core\Acp\Package\Plugin
+ * @since 3.0
*/
-class MenuItemPackageInstallationPlugin extends AbstractXMLPackageInstallationPlugin {
+class MenuItemPackageInstallationPlugin extends AbstractXMLPackageInstallationPlugin implements IIdempotentPackageInstallationPlugin {
/**
* @inheritDoc
*/
WHERE " . ($parentItemID === null ? 'menuID' : 'parentItemID') . " = ?";
$statement = WCF::getDB()->prepareStatement($sql, 1);
$statement->execute([
- ($parentItemID === null ? $menuID : $parentItemID)
+ $parentItemID === null ? $menuID : $parentItemID
]);
$row = $statement->fetchSingleRow();
return (!$row['showOrder']) ? 1 : $row['showOrder'] + 1;
}
+
+ /**
+ * @inheritDoc
+ */
+ public static function getSyncDependencies() {
+ return ['language'];
+ }
}