Skip to content

Commit

Permalink
Update according to feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
mattamon committed Nov 21, 2024
1 parent 7437184 commit 228949f
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 58 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/codeception.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
include:
- { php-version: 8.1, database: "mariadb:10.11", pimcore_version: "", dependencies: highest, experimental: false, require_admin_bundle: true }
- { php-version: 8.2, database: "mariadb:10.11", pimcore_version: "", dependencies: highest, experimental: false, require_admin_bundle: true }
- { php-version: 8.3, database: "mariadb:10.11", pimcore_version: "11.x-dev as 11.9.99", dependencies: highest, experimental: true, require_admin_bundle: true }
- { php-version: 8.3, database: "mariadb:10.11", pimcore_version: "11.x-dev", dependencies: highest, experimental: true, require_admin_bundle: true }
services:
mariadb:
image: "${{ matrix.database }}"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
include:
- { php-version: "8.1", dependencies: "highest", pimcore_version: "", phpstan_args: "", experimental: false, require_admin_bundle: true }
- { php-version: "8.2", dependencies: "highest", pimcore_version: "", phpstan_args: "", experimental: false, require_admin_bundle: true }
- { php-version: "8.3", dependencies: "highest", pimcore_version: "11.x-dev as 11.9.99", phpstan_args: "", experimental: true, require_admin_bundle: true }
- { php-version: "8.3", dependencies: "highest", pimcore_version: "11.x-dev", phpstan_args: "", experimental: true, require_admin_bundle: true }
steps:
- name: "Checkout code"
uses: "actions/checkout@v2"
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@ This bundle provides an editor for Pimcore to manage custom views and perspectiv
## Documentation Overview
- [Installation & Configuration](./doc/01_Installation.md)
- [Customize Menu Entry List](./doc/02_Customize_Menu_Entry_List.md)
- [Upgrade Notes](./doc/03_Upgrade.md)
5 changes: 1 addition & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"minimum-stability": "dev",
"require": {
"pimcore/compatibility-bridge-v10": "^1.0",
"pimcore/admin-ui-classic-bundle": "^1.6",
"pimcore/admin-ui-classic-bundle": "^1.0",
"pimcore/pimcore": "^11.2",
"symfony/http-foundation": "^6.3"
},
Expand All @@ -26,9 +26,6 @@
"codeception/phpunit-wrapper": "^9",
"codeception/module-asserts": "^2"
},
"suggest": {
"pimcore/admin-ui-classic-bundle": "Required for Pimcore 11"
},
"autoload": {
"psr-4": {
"Pimcore\\Bundle\\PerspectiveEditorBundle\\": "src/"
Expand Down
39 changes: 0 additions & 39 deletions doc/01_Installation.md
Original file line number Diff line number Diff line change
@@ -1,49 +1,11 @@
# Installation
## Bundle Installation
### For Pimcore >= 10.5 & \<= 10.6
To install Pimcore Perspective Editor for Pimcore 10.5 or higher, follow the three steps below:

1. Install the required dependencies:
```bash
composer require pimcore/perspective-editor
```

2. Make sure the bundle is enabled in the `config/bundles.php` file. The following lines should be added:

```php
use Pimcore\Bundle\PerspectiveEditorBundle\PimcorePerspectiveEditorBundle;
// ...

return [
// ...
PimcorePerspectiveEditorBundle::class => ['all' => true],
// ...
];
```

3. Install the bundle:

```bash
bin/console pimcore:bundle:install PimcorePerspectiveEditorBundle
```

### For Pimcore 11

You need to follow the steps mentioned above and additionally run the following command:

```bash
composer require pimcore/admin-ui-classic-bundle
```

### For Older Versions
To install the Perspective Editor bundle for older versions of Pimcore, please run the following commands instead:

```bash
composer require pimcore/perspective-editor
bin/console pimcore:bundle:enable PimcorePerspectiveEditorBundle
bin/console pimcore:bundle:install PimcorePerspectiveEditorBundle
```

Installation routine just adds an additional permission to `users_permission_definitions` table.

Also, make sure, that `customviews.php` and `perspectives.php` files are writeable for php.
Expand All @@ -53,7 +15,6 @@ They can be located at Pimcore default locations for config files:
If they don't exist, they are created at `PIMCORE_CONFIGURATION_DIRECTORY`.



## Configuration

To make the bundle work, just make sure, users have the necessary permissions.
Expand Down
14 changes: 1 addition & 13 deletions src/Resources/public/js/pimcore/perspective/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,4 @@ pimcore.events.postCreatePerspectiveEditorElementTreeTypeStore = "pimcore.perspe
/**
* fired after ElementTreeIcons Array was initialized
*/
pimcore.events.addPerspectiveEditorElementTreeIcon = 'pimcore.perspectiveEditor.elementTreeIcon.add';




//TODO: delete once support for Pimcore 10.6 is dropped
if(typeof addEventListenerCompatibilityForPlugins === "function") {
let eventMappings = [];
eventMappings["onPerspectiveEditorLoadPermissions"] = pimcore.events.onPerspectiveEditorLoadPermissions;
eventMappings["onPerspectiveEditorLoadStructureForPermissions"] = pimcore.events.onPerspectiveEditorLoadStructureForPermissions;
addEventListenerCompatibilityForPlugins(eventMappings);
console.warn("Deprecation: addEventListenerCompatibilityForPlugins will be not supported in Pimcore 11.");
}
pimcore.events.addPerspectiveEditorElementTreeIcon = 'pimcore.perspectiveEditor.elementTreeIcon.add';

0 comments on commit 228949f

Please sign in to comment.