Recently i created nice and simple Symfony widget: sfWidgetFormJQueryMultiSelect. It’s really simple in use and implementation. I have used code written recently by Eric Hynds: jQuery MultiSelect Plugin w/ ThemeRoller Support and standard sfWidgetFormChoice.
Continue reading ‘Symfony and jQuery: sfWidgetFormJQueryMultiSelect ver 0.1′
Now when Symfony 1.4 and Dcotrine 1.2 time has come, i want to show you how easily we can use them with JavaScript framework ExtJs 3.0 - which is typically used to build advanced user interfaces. More information about that amazing library can be found on the main project website. In this post I would like to demonstrate the capabilities of one of the components of this powerful framework - GridPanel. I will use most of the code presented in the previous entry, however, it will be updated to work correctly with the latest Symfony version.
Continue reading ‘Symfony 1.4 and ExtJS - displaying data in GridPanel [english]‘
Ostatnio miałem przyjemność poznać i przetestować możliwości frameworka JavaScript: ExtJS. Jest to biblioteka przeznaczona do budowania zaawansowanych interfejsów użytkownika, w szczególności paneli administracyjnych.
W niniejszym wpisie chciałbym na prostym przykładzie zademonstrować możliwości jednego z komponentów tego potężnego frameworka - GridPanel . Jeszcze nie wiem czy będzie to część większego cyklu kursów o extjs i czy pojawi się on także w wersji angielskiej (wersja angielska - dodatkowo zaktualizowana dla Symfony 1.4 i Doctrine), ale narazie w planie mam wpisy dotyczące integracji z zaawansowanym systemem filtrów (ExtJS filter plugin) i dodawania/edytowania elementów do grida za pomocą modalnych okien - o ile oczywiście tematyka tego wpisu spotka się z zainteresowaniem.
Continue reading ‘Symfony 1.2 i ExtJS - wyÅ›wietlanie danych w gridzie’
Last week I received my copy of new Symfony book: Symfony 1.3 Web Application Development. What is really interesting about this book that it has been released even before Symfony 1.3 Alpha version. The book gives an overview of Symfony Framework and covers almost each stage of application developing process: from creating the application structure and database schema, to creating the Admin Area, performance optimization and deployment. As we know the best way to learn is to learn by example and this book describies how to build milkshake shop quite well.
Continue reading ‘Symfony 1.3 Web Application Development - my review’
W ubiegłym tygodniu ukazała się wersja 1.3 alpha znakomitego frameworka Symfony. Z pewnością nie uświadczymy rewolucji podobnej do tej w momencie ukazania się sf 1.1 i 1.2, jednak liczne drobne zmiany jakie wprowadzono powinny dość znacząco usprawnić naszą prace - pełna lista zmian dostępna jest tutaj. Wersja 1.3 podobnie jak 1.1 ma być jedynie wersją przejściową do 1.4, która ma się ukazać dopiero w 2010 roku i która będzie wspierana do 2013.
Continue reading ‘Symfony 1.3′
After a couple of weeks i decided to write another post about Symfony 1.2 and jQuery. This simple tutorial shows you how integrate jQuery layout plugin, jQuery accordion widget for navigation and Symfony admin generator.
Symfony offers nice and powerfull admin generator feature. After rewriting in version 1.2 it uses form and filter framework which makes it really easy and customizable. For more details you need to check admin generator documentation .
“JQuery Layout plug-in was inspired by the extJS border-layout, and recreates that functionality as a jQuery plug-in. The UI.Layout plug-in can create any UI look you want - from simple headers or sidebars, to a complex application with toolbars, menus, help-panels, status bars, sub-forms, etc.”
What i really like about the admin generator is its… generator feature. After a couple of minutes we have all the basic actions for our models. We can also add custom actions and modify templates. The missing component for me is navigation. We can create some simple navigation between modules alone, we can also use nice Symfony plugin: sfAdminDashPlugin or jQuery plugin: layout. The picture below shows the final result of what i’m going to do in this tutorial.

Continue reading ‘Symfony 1.2 + admin generator + jquery layout plugin’
It’s kind of update of function: unsetAllExcept. Lately I had a problem with unsetting some default widgets. Using for example propel and relations m-n, auto-generated forms have widgets that cannot be unsets using the current version of function - it only unset widgets by form object fields.
I think it could be useful:
<?php
/**
* unset all fields except given parameters
*
* @param array $fields Array of fields
*/
public function unsetAllExcept($fields = array())
{
$tmp = array_keys($this->widgetSchema->getFields());
foreach(array_diff($tmp, $fields) as $value){
unset($this[$value]);
}
}
?>
This time i want to give you simple example about how to create multipage (wiazard) form using great Symfony 1.2 form framework. It would be simple 3 steps registeration form with validation after each step. In this example i’m using propel but it would also work great wiht Doctrine. Lets start!
First, we need to start a new project, create frontend application and multiPageForm module (from the command line prompt):
symfony generate:project multipageFormApp
symfony generate:app frontend
symfony generate:module frontend multiPageForm
Continue reading ‘Symfony 1.2 and multipage form - wizard’
Celowo nie chciaÅ‚em tytuÅ‚ować wpisu Symfony vs Zend Framework bo wpisów o podobnej tematyce jest bardzo dużo. Jedne mniej, drugie bardziej konkretne i sensowne. Można siÄ™ spierać który z tych dwóch frameworków jest lepszy, jednak tak naprawdÄ™ pytanie brzmi, który jest dla nas bardziej odpowiedni, intuicyjny i z którym bÄ™dzie Nam siÄ™ lepiej pracowaÅ‚o. Ogólnie rzecz biorÄ…c bardzo drażniÄ…cÄ… sprawÄ… sÄ… wszelkie kłótnie: “który framework lepszy?”, “który wybrać”, “Zend Framework vs Symfony” - wszystko zależy od wymagaÅ„ projektu i programisty. Porównanie tym bardziej jest trudne, że Zf i Sf z zaÅ‚ożeÅ„ oferujÄ…c podobne możliwoÅ›ci, sÄ… zupeÅ‚nie różne. PostanowiÅ‚em wiÄ™c przedstawić moje skromne zdanie.
Z góry zaznaczam, że nie będę tutaj pisał nic o Cake PHP, CodeIgniter czy Kohanie. Nigdy nie miałem okazji pracować z żadnym z tych frameworków i w najbliższym czasie nie przewiduje, żeby coś w tym temacie się zmieniło.
Poniżej postaram się krótko i konkretnie przedstawić moje osobiste przemyślenia na ten temat, na podstawie własnych doświadczeń jakie mam w pracy z Sf i ZF. Wszelkie uwagi i opinie są bardzo mile widziane.
Continue reading ‘Symfony i Zend Framework’
I was wondering if there is any simple way in Symfony for calling cron job. I found in the documentation that we can use Batch files - it is kind of PHP script that looks similar to symfony front controller, all we need to do is to initalize symfony, parse project and application Configuration. Quite cool but there is better way (just in my opinion) to access all symfony features from the command line: tasks.
Every time we are creating project, generating modules, building models/forms we use standard symfony tasks. Task are grouped by namespace and name - this allows us to build intuitive script names. For example namespace: propel or doctrine, and the task name: build-model, build-sql. Why we should use tasks instead of batch files? Tasks are really simple, powerful and they take care of parsing command line arguments and options, initalizing needed configuration and classes. To create a simple task we have to create a class that exetend sfBaseTask and put it into lib/task/ directory. File name must ends with “Task.class.php” to be properly loaded.
Another great thing about tasks is that Symfony also provide task for generating new, custom tasks 
Continue reading ‘Symfony 1.2 - tasks and cron’
Najświeższe komentarze