PHPackages                             wwwision/neos-modulecomponents - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. wwwision/neos-modulecomponents

ActiveNeos-package[Utility &amp; Helpers](/categories/utility)

wwwision/neos-modulecomponents
==============================

Flow package with utilities and components to create Fusion based backend modules with the common Neos look and feel

1.3.0(1mo ago)107.6k↓72.7%11GPL-3.0-or-laterPHPPHP &gt;=8.1

Since Jan 1Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/bwaidelich/Wwwision.Neos.ModuleComponents)[ Packagist](https://packagist.org/packages/wwwision/neos-modulecomponents)[ GitHub Sponsors](https://github.com/sponsors/bwaidelich)[ Fund](https://www.paypal.me/bwaidelich)[ RSS](/packages/wwwision-neos-modulecomponents/feed)WikiDiscussions main Synced today

READMEChangelog (5)Dependencies (6)Versions (8)Used By (1)

Fusion Components for Neos Backend Modules
==========================================

[](#fusion-components-for-neos-backend-modules)

[Neos](https://neos.io) package with utilities and components to create Fusion based backend modules with the common look and feel

Usage
=====

[](#usage)

1. In the `composer.json` file of a Neos package (let's assume a package key of `Some.Package`), add the following dependency:

```
{
  "type": "neos-package",
  "name": "some/package",
  // ...
  "require": {
    // ...
    "wwwision/neos-modulecomponents": "^1"
  }
  // ...
}
```

Afterwards make sure to install the new dependencies by running

```
composer update
```

2. Configure a Neos Backend Module as [documented](https://docs.neos.io/tutorials/creating-a-backend-module-with-fusion-and-fusion-form) via `Settings.yaml`:

```
Neos:
  Neos:
    modules:
      # Will add this submodule module underneath the "administration" main module
      # Alternative main module name is "management", but you can also define completely new main module here
      'administration':
        submodules:
          # The key of this sub module, can be any string and defines the path that is used in the URL and in privilege target definitions
          'some-module':
            label: 'Some Backend module'
            controller: 'Some\Package\Controller\SomeModuleController'
            description: 'Description for the module'
            icon: 'vial'
            additionalResources:
              styleSheets:
                - 'resource://Wwwision.Neos.ModuleComponents/Public/Styles/module.css'
              javaScripts:
                - 'resource://Wwwision.Neos.ModuleComponents/Public/Scripts/module.js'
```

Important

Make sure to specify the provided `module.css` and `module.js` as "additionalResources"

3. Provide a corresponding privilege target and grant it to any role that should have access to the module via `Policy.yaml`:

```
privilegeTargets:
  'Neos\Neos\Security\Authorization\Privilege\ModulePrivilege':
    # Define a privilege for the "Example Module" on the basis of its module path (see Settings.Neos.yaml)
    'Some.Package:SomeModule':
      matcher: 'administration/some-module'

roles:
  'Neos.Neos:Administrator':
    privileges:
      # Grant administrators access to the module
      # In custom implementations it could make sense to add a dedicated role for this or to leave privilege allocations completely out of the module package itself (so that it can be done in the integration, e.g. the site package)
      - privilegeTarget: 'Some.Package:SomeModule'
        permission: GRANT
```

4. Create a corresponding MVC controller and override the default View implementation:

```
