<?php
namespace wcf\system\package\plugin;
-use wcf\system\exception\SystemException;
-use wcf\util\ClassUtil;
/**
* Installs, updates and deletes ACP menu items.
// controller
$result['menuItemController'] = isset($data['elements']['controller']) ? $data['elements']['controller'] : '';
- if (!empty($result['menuItemController'])) {
- if (!ClassUtil::isInstanceOf($result['menuItemController'], 'wcf\action\IAction') && !ClassUtil::isInstanceOf($result['menuItemController'], 'wcf\page\IPage')) {
- throw new SystemException("Menu item controller '".$result['menuItemController']."' is not a valid page controller");
- }
- }
return $result;
}
<?php
namespace wcf\system\package\plugin;
use wcf\system\exception\SystemException;
-use wcf\util\ClassUtil;
/**
* Installs, updates and deletes page page menu items.
// controller
$result['menuItemController'] = (isset($data['elements']['controller'])) ? $data['elements']['controller'] : '';
- if (!empty($result['menuItemController'])) {
- if (!ClassUtil::isInstanceOf($result['menuItemController'], 'wcf\action\IAction') && !ClassUtil::isInstanceOf($result['menuItemController'], 'wcf\page\IPage')) {
- throw new SystemException("Menu item controller '".$result['menuItemController']."' is not a valid page controller");
- }
- }
// class name
if (!empty($data['elements']['classname'])) {