nyrodev / utility-bundle
Utility Bundle for Symfony, provide many shortcut and useful functionnalities
Package info
github.com/nyroDev/UtilityBundle
Type:symfony-bundle
pkg:composer/nyrodev/utility-bundle
Requires
- nyrodev/php-template-bundle: dev-master
- symfony/framework-bundle: ^7
- symfony/templating: ^7
Suggests
- becklyn/ordered-form-bundle: Used for form positionning
- embed/embed: Required to use EmbedService
- sabberworm/php-css-parser: Required to use rem2px command
- slim/psr7: Required to use EmbedService, or any other PS7 implementation
- tinymce/tinymce: Required to use TinymceType
- dev-master
- 7.x-dev
- v7.0
- 6.x-dev
- v6.2
- v6.1
- v6.0
- 5.x-dev
- v5.6
- v5.5
- v5.4
- v5.3
- v5.2
- v5.1
- v5.0
- 4.x-dev
- v4.16
- v4.15
- v4.14
- v4.13
- v4.12
- v4.11
- v4.10
- v4.9
- v4.8
- v4.7
- v4.6
- v4.5
- v4.4
- v4.3
- v4.2
- v4.1
- 2.8.x-dev
- v2.8.18
- 2.8.17
- v2.8.16
- v2.8.15
- v2.8.14
- v2.8.13
- v2.8.12
- v2.8.11
- v2.8.10
- v2.8.9
- v2.8.8
- v2.8.7
- v2.8.6
- v2.8.5
- v2.8.4
- v2.8.3
- v2.8.2
- v2.8.1
- v2.8.0
- 1.0.0
- dev-dev
This package is auto-updated.
Last update: 2026-03-12 19:07:09 UTC
README
Using form twig template
Add in config/packages/twig.yaml
twig: form_themes: - '@NyroDevUtility/Form/nyrodev_form_div_layout.html.twig'
Using TinymceType
Add tinymce to your dependancies:
composer require tinymce/tinymce
Add tinymce depency your webpack encore config:
.addPlugin(new CopyWebpackPlugin({ patterns: [ {from: 'vendor/tinymce/tinymce', to: '../tinymce'} ] }))
Translate Tinymce
Require tinymce npm dependancy:
npm i tinymce-i18n
Then copy the language file you need by adding to your webpack encore config:
.addPlugin(new CopyWebpackPlugin({ patterns: [ {from: 'vendor/tinymce/tinymce', to: '../tinymce'}, {from: 'vendor/nyrodev/utility-bundle/Resources/public/js/filemanager', to: '../tinymce/plugins/filemanager'}, {from: 'node_modules/tinymce-i18n/langs8/fr-FR.js', to: '../tinymce/langs/'}, { from: 'node_modules/tinymce-i18n/langs8/fr-FR.js', to: '../tinymce/langs/fr.js', transform: (input, filename) => { return input.toString().replace('tinymce.addI18n("fr-FR", {', 'tinymce.addI18n("fr", {'); } } ] }))
Using tinymce browser feature
Add JS and CSS generation to your webpack encore config:
.addEntry('css/admin/tinyBrowser', './vendor/nyrodev/utility-bundle/Resources/public/css/tinyBrowser/index.css') .addEntry('js/admin/tinyBrowser', './vendor/nyrodev/utility-bundle/Resources/public/js/tinyBrowser/index.js')
Add tinymce plugins depency your webpack encore config:
.addPlugin(new CopyWebpackPlugin({ patterns: [ {from: 'vendor/tinymce/tinymce', to: '../tinymce'}, {from: 'vendor/nyrodev/utility-bundle/Resources/public/js/filemanager', to: '../tinymce/plugins/filemanager'}, {from: 'node_modules/tinymce-i18n/langs8/fr-FR.js', to: '../tinymce/langs/'}, { from: 'node_modules/tinymce-i18n/langs8/fr-FR.js', to: '../tinymce/langs/fr.js', transform: (input, filename) => { return input.toString().replace('tinymce.addI18n("fr-FR", {', 'tinymce.addI18n("fr", {'); } } ] }))
Create a route for the browser page, in config/routes/browser.yaml:
Be sure to protect this route behind a security firewall!
tiny_browser: path: "%adminPrefix%/tinyBrowser/{type}/{dir}" controller: NyroDev\UtilityBundle\Controller\TinymceController::browserAction defaults: dir: null requirements: dir: '.+'
If you want to enable on every TinymceType by default:
nyro_dev_utility: browser: defaultEnable: true defaultRoute: 'tiny_browser' allowAddDir: true
Using resize assets URL
Simply import this in your config/routes/nyrodev.yaml:
nyrodev_assets: resource: "@NyroDevUtilityBundle/Resources/config/routingAssets.yaml"
Then you can use the nyrodev_assets_resize route.