| @@ -25,9 +25,8 @@ | ||
| 25 | 25 | use UserAccessManager\Setup\Database\DatabaseHandler; |
| 26 | 26 | use UserAccessManager\Setup\SetupHandler; |
| 27 | 27 | use UserAccessManager\Setup\Update\UpdateFactory; |
| 28 | 28 | use UserAccessManager\UserAccessManager; |
| 29 | -use UserAccessManager\UserGroup\AssignedObjectsLoader; | |
| 30 | 29 | use UserAccessManager\UserGroup\AssignmentInformationFactory; |
| 31 | 30 | use UserAccessManager\UserGroup\UserGroupAssignmentHandler; |
| 32 | 31 | use UserAccessManager\UserGroup\UserGroupFactory; |
| 33 | 32 | use UserAccessManager\UserGroup\UserGroupHandler; |
| @@ -64,9 +63,9 @@ | ||
| 64 | 63 | $mainConfig = new MainConfig($wordpress, $objectHandler, $cache, $configParameterFactory); |
| 65 | 64 | $fileObjectFactory = new FileObjectFactory(); |
| 66 | 65 | $formFactory = new FormFactory(); |
| 67 | 66 | $formHelper = new FormHelper($php, $wordpress, $mainConfig, $formFactory); |
| 68 | - $assignedObjectsLoader = new AssignedObjectsLoader($wordpress, $database, $assignmentInformationFactory); | |
| 67 | + | |
| 69 | 68 | $userGroupFactory = new UserGroupFactory( |
| 70 | 69 | $php, |
| 71 | 70 | $wordpress, |
| 72 | 71 | $database, |
| @@ -72,9 +71,9 @@ | ||
| 72 | 71 | $database, |
| 73 | 72 | $mainConfig, |
| 74 | 73 | $util, |
| 75 | 74 | $objectHandler, |
| 76 | - $assignedObjectsLoader | |
| 75 | + $assignmentInformationFactory | |
| 77 | 76 | ); |
| 78 | 77 | $userHandler = new UserHandler( |
| 79 | 78 | $wordpress, |
| 80 | 79 | $mainConfig, |
| @@ -255,12 +254,9 @@ | ||
| 255 | 254 | |
| 256 | 255 | $userAccessManager->addActionsAndFilters(); |
| 257 | 256 | |
| 258 | 257 | //Add the cli interface to the known commands |
| 259 | - if (defined('WP_CLI') === true | |
| 260 | - && WP_CLI === true | |
| 261 | - && class_exists('WP_CLI_Command') | |
| 262 | - ) { | |
| 258 | + if (defined('WP_CLI') === true && WP_CLI === true) { | |
| 263 | 259 | $cliWrapper = new WordpressCli(); |
| 264 | 260 | |
| 265 | 261 | $groupCommand = new GroupCommand($cliWrapper, $userGroupHandler, $userGroupFactory); |
| 266 | 262 | $objectCommand = new ObjectCommand($cliWrapper, $userGroupHandler); |