Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sherlockode/sonataadvancedcontentbundle
Sonata admin integration for SherlockodeAdvancedContentBundle
https://github.com/sherlockode/sonataadvancedcontentbundle
Last synced: about 5 hours ago
JSON representation
Sonata admin integration for SherlockodeAdvancedContentBundle
- Host: GitHub
- URL: https://github.com/sherlockode/sonataadvancedcontentbundle
- Owner: sherlockode
- License: mit
- Created: 2018-07-17T17:04:37.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-11-24T10:24:47.000Z (12 months ago)
- Last Synced: 2024-03-24T20:43:45.837Z (8 months ago)
- Language: PHP
- Homepage:
- Size: 65.4 KB
- Stars: 0
- Watchers: 7
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
SherlockodeSonataAdvancedContentBundle
======================================Sonata Admin integration for SherlockodeAdvancedContentBundle
## Installation
The best way to install this bundle is to rely on [Composer](https://getcomposer.org/):
```bash
$ composer require sherlockode/sonata-advanced-content-bundle
```Register the bundle in your application's kernel and make sure that this bundle is added
after the [AdvancedContentBundle](https://github.com/sherlockode/advanced-content-bundle)```php
// config/bundles.php
['all' => true],
Sherlockode\SonataAdvancedContentBundle\SherlockodeSonataAdvancedContentBundle::class => ['all' => true],
];
```You will need to add our specific CSS and JS files to your application via webpack and Sonata configuration.
```js
// assets/js/app.js// sherlockode/advanced-content-bundle configuration
import '../../vendor/sherlockode/advanced-content-bundle/Resources/public/css/index.scss';
import '../../vendor/sherlockode/advanced-content-bundle/Resources/js/index.js';// font awesome (optional)
import '@fortawesome/fontawesome-free/css/fontawesome.css';
import '@fortawesome/fontawesome-free/css/solid.css';// sherlockode/sonata-advanced-content-bundle configuration
import '../../vendor/sherlockode/sonata-advanced-content-bundle/Resources/js/acb-sonata.js';
import '../../vendor/sherlockode/sonata-advanced-content-bundle/Resources/css/acb-sonata.scss';
```You can then add the following lines to your Sonata configuration:
```yaml
# config/packages/sonata_admin.yaml
sonata_admin:
assets:
extra_javascripts:
- bundles/sherlockodeadvancedcontent/js/speakingurl.min.js
- build/admin/admin-entry.js # Include here the path to your webpack generated admin js file
extra_stylesheets:
- build/admin/admin-entry.css # Include here the path to your webpack generated admin css file
```## Security
By default our admins are accessible by ROLE_SUPER_ADMIN.
To configure your own role hierarchy, you can use the roles :
- ROLE_SHERLOCKODE_ADVANCED_CONTENT_ADMIN_CONTENT_[PERMISSION] : access to Contents
- ROLE_SHERLOCKODE_ADVANCED_CONTENT_ADMIN_PAGE_TYPE_[PERMISSION] : access to Page Types
- ROLE_SHERLOCKODE_ADVANCED_CONTENT_ADMIN_PAGE_[PERMISSION] : access to PagesFor example, if you want to grant all permissions for ROLE_ADMIN, you can add :
```yaml
# config/packages/security.yaml
security:
role_hierarchy:
ROLE_ADMIN:
- ROLE_SHERLOCKODE_ADVANCED_CONTENT_ADMIN_CONTENT_ALL
- ROLE_SHERLOCKODE_ADVANCED_CONTENT_ADMIN_PAGE_TYPE_ALL
- ROLE_SHERLOCKODE_ADVANCED_CONTENT_ADMIN_PAGE_ALL
```