No longer maintained
PHP JavaScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.

Jasny for Symfony

This library is an extension to Symfony2. With the Jasny bundles, developers can create deployable applications extremely fast, so they can go out to enjoy the sun :).

This library is no longer maintained.


Install Symfony in {PROJECT_HOME} by following

git clone git:// vendor/jasny
make -C vendor/jasny

To upgrade, run

make -C vendor/jasny upgrade


The jasny bundles require at least Symfony 2.0.8.


The ORM bundle adds much functionality to Doctrine ORM:

  • Spatial support through the new Point type and DISTANCE function.
  • Implement the Referenceable interface to find an enitity by a unique reference (e.g. slug or username) instead of the id.
  • A unique reference (slug) is automatically set for entities that implement the AutoReferencing interface.
  • Easily store an uploaded file for the entity with FileBinding.

Newly generated entites will use the extended repository manager from the ORM bundle, supporting order by for findOneBy as well as adding methods load, findFirst and count.


The Framework bundle comes with an extended form base class and a customized twig form view.

Form types

Several form field types are added:

  • Date / Datetime - Overwrites standard symfony date/datetime type, to support the locale
  • Editor - A textarea with classname 'editor'
  • CKEditor - CKEditor, including support for KCFinder (yeah baby :D)
  • AutoReference - For automatically generated references (e.g. slugs) TODO
  • File - Overwrites the way to basic symfony file type
  • Image - Image type showing a thumbnail
  • Link - A text input or textarea, that is shown as a link in uneditable mode
  • Phonenumber - An input for phonenumbers (with icon prefix in Bootstrap)
  • Country - A choice element with all the countries in the world
  • Typeahead - A Bootstrap typeahead element with id > entity conversion


The Jasny Framework bundle adds the following filters to Twig:

  • localdate / localtime / localdatetime - Format a date value as a string based on the current locale
  • preg_match / preg_replace / preg_split - Exposing PCRE to Twig
  • paragraph - Add HTML paragraph and line breaks to text
  • more - Cut of text on a pagebreak
  • truncate - Cut of text if it's to long
  • linkify - Turn all URLs in clickable links (also supports Twitter @user and #subject)
  • split - Split text into an array (explode)

CRUD Generators

This project comes with 2 sets of generators:

  • The Bootstrap generator employs the Twitter Bootstrap CSS library to create a clean and slick CRUD screens. (See
  • The vanilla generator creates a scaffold on which you can apply your own custom styling.

Both generators have the option to create controllers, forms and views based on entities in another bundle. This allows for the creation of separate front and back office bundles.


php app/console bootstrap:generate:crud
php app/console vanilla:generate:crud

Please use php app/console help {COMMAND} to find out more.


You can easily create a custom CRUD generator.

  • Copy the 'Command' and 'Resources' directory from Jasny/VanillaBundle to your own bundle.
  • Modify the namespace and bundle name in both commands.
  • Change the skeleton and public files from the 'Resources' directory

Browser detection

The 'browser' service can be accessed to get information about the browser capabilities of the client. (uses browscap:

Bug tracker

Have a bug? Please create an issue here on GitHub!


Arnold Daniels

Copyright and license

Copyright 2011 Jasny BV.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this work except in compliance with the License. You may obtain a copy of the License in the LICENSE file, or at:

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.