zikula/jquery-ui-bundle
A Symfony/Zikula bundle that packages jQuery UI JavaScript and CSS assets for easy integration into your application, letting you load the library and themes through the framework's asset system instead of managing vendor files manually.
The bundle is a thin Symfony wrapper that ships jQuery UI 1.x assets and exposes Twig helpers to render the required <script> and <link> tags. There is no runtime logic beyond asset resolution, so "getting started" is almost entirely wiring.
composer require zikula/jquery-ui-bundle (pin a version — the latest tagged release is from mid-2017).app/AppKernel.php (Symfony 2/3 style): new Zikula\Bundle\JQueryUIBundle\ZikulaJQueryUIBundle(), and add optional config under zikula_jquery_ui: in config.yml.Resources/views/, Twig/ (or Templating/) for the helper implementations, and Resources/public/ for the shipped jQuery UI JS/CSS/theme folders. The bundle's DependencyInjection/Configuration.php is the authoritative list of config keys (theme name, locale, whether to use CDN vs. local files).app/Resources/views/base.html.twig, drop {{ jqueryui_css() }} into the <head> and {{ jqueryui_js() }} just before </body> (after jQuery itself). Then initialize a widget in a page template:{% block javascripts %}
{{ parent() }}
{{ jqueryui_js() }}
<script>
$(function () { $('#tabs').tabs(); });
</script>
{% endblock %}
If your first render throws "unknown function", the Twig extension isn't registered — check that the bundle was actually added to the kernel and that cache was cleared.
Centralize the helpers in the layout, not in every page. Put jqueryui_css() / jqueryui_js() once in base.html.twig and let page templates only add init code. Since the bundle has no per-page dependency tracking, you own the ordering.
Theme selection is config-driven. The theme name (e.g. smoothness, base, redmond) maps to the CSS subfolder shipped in Resources/public/themes/. Swapping themes means changing one config.yml value, not editing templates — use this to keep environment-specific themes (e.g. a high-contrast theme for staging).
Locale switching. If the bundle exposes a locale setting, set it per-request from $request->getLocale() via a small kernel.request listener or a bundle config parameter rather than hard-coding it. jQuery UI's datepicker locale files live alongside the core JS.
CDN vs. local: Most Zikula-era bundles support a use_cdn style toggle. For local development prefer local assets so the bundle's shipped version is the source of truth; for production either is fine, but keep the jQuery UI version pinned to match the widget init code.
Integration with forms. If you use jQuery UI datepicker on Symfony form fields, add a small form theme in app/Resources/views/Form/ that adds a data-jqueryui-datepicker attribute, then initialize globally:
$(document).on('focus', '[data-jqueryui-datepicker]', function () {
if (!$(this).data('datepicker')) { $(this).datepicker(); }
});
This avoids per-field Twig boilerplate and survives re-rendered form collections.
Assetic/Encore coexistence. Do not double-register the same JS. If you're on Assetic, let the bundle render its tags and don't also include jquery-ui in your javascripts block. If you're on Webpack Encore (Symfony 4+), you almost certainly want to bypass the bundle entirely and npm i jquery-ui — the bundle predates and doesn't understand Encore's entrypoint manifests.
Bundle base and YAML/XML service configs before committing to it.<script> for jQuery UI appears before jQuery, every widget silently no-ops with $ is not defined or $(...).tabs is not a function. Verify order in view-source, not in the Twig file.config.yml requires php bin/console cache:clear (or removing app/cache/*); the asset URL is cached..ui-state-default, .ui-widget, etc.) and can clash with Bootstrap or your own UI kit. Either scope it or accept the visual conflict — there is no isolation in a 2017-era bundle.Resources/public being symlinked/copied to web/bundles/zikulajqueryui/. If you get 404s on the theme CSS, run php bin/console assets:install --symlink (or --relative).composer.json and record the jQuery UI version in a README note. Future-you will need to know which widget APIs are available (e.g. controlgroup only appeared in 1.10+).TypeError from a missing widget file will abort the rest of the script block.app/Resources/ZikulaJQueryUIBundle/views/, (b) replacing the Twig extension service via a compiler pass if you need custom asset URLs, and (c) overriding the config. There is no plugin system — don't look for one.jquery-ui from npm via Encore (or migrate to a modern widget library). The archive status, zero stars, and 2017 last release mean you will be the sole maintainer of any forks. If you must stay on it for a legacy app, isolate the helpers behind your own Twig functions so you can swap the implementation later without touching every template.How can I help you explore Laravel packages today?