Tag Archive for 'Tutorial'

Advanced data filtering with Symfony 1.4 and ExtJS 3.2 [english]

After a couple of weeks I finally found some time to write about Symfony and ExtJS. This time i want to show how to put together to work Symfony 1.4, ExtJS 3.2 and Grid Filter Plugin - for me it’s the one of most powerfull filtering solutions i have ever seen.
Since my last entry about displaying data in ExtJS Grid Panel i have updated Ext library to 3.2 version - they have added some nice features (more information you can find in changelog 3.1 and changelog 3.2) and changed some ExtJs components (more details you will find later).

Continue reading ‘Advanced data filtering with Symfony 1.4 and ExtJS 3.2 [english]‘

Symfony and jQuery: sfWidgetFormJQueryMultiSelect ver 0.1

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′

ExtJS ans simple JavaScirpt Internationalization (i18n)

Lastely, building quite big Symfony and Ext.js application i was looking for simple way to make my application internationalized. I haven’t found any good solutions that would suits my needs. I found this on extjs forum: ‘The simplest way, perhaps, is to extract hardcoded strings to locale files. Then your framework just have to load the selected language file together with YUI-ext.” I didn’t like that idea, i think it would be good for building some custom components but not for internationalize the whole application. I needed something quicker and less complicated.
Than, i thought that i can write my own simple i18n mechanism - maybe there is better way (files can be generated on the server side), but this work for sure.
Continue reading ‘ExtJS ans simple JavaScirpt Internationalization (i18n)’

Symfony 1.4 and ExtJS - displaying data in GridPanel [english]

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]‘

Symfony 1.2 i ExtJS - wyświetlanie danych w gridzie

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’

Symfony + jQuery Flexigrid

Nothing special but some of you had problems putting it together. So, i decided to write simple tutorial describing how to use jquery Flexigrid with Symfony. I will use the same data as in the tutorial: Zend Framework + Doctrine + jQuery Grid . Eveything will be the same, except that we will use Symfony instead of Zend.

First we need to create new symfony project:

symfony generate:project someProjectName

or simply download sf_sandbox.

Next step is to create symfony app:

symfony generate:app frontend

Then we need one module, for example “grid”:

symfony generate:module frontend grid

Continue reading ‘Symfony + jQuery Flexigrid’

Symfony 1.2 - using sfForm with jquery validate plugin

Build-in symfony form validation is really great feature. Using Propel or Doctrine ORM we have simple validation by default which we can modify in simple way.
But sometimes we want something more than server side validation (later in post SSV) and then we can easliy use javascript. Client side validation (CSV) is nice and useful but we need to remember that it could be easily switched off. So SSV is always required.

Let’s begin.

I’m not going to build a whole application. I just want to show you how to create simple contact form, validate it using SSV and CSV (with jQuery) and save it.

First of all we need to create new symfony app. If we have symfony already installed on our PC, we can just create new project directory, for example sfSimpleApp and then call:


<?php

    symfomy generate:project sfSimpleApp

?>

Remember that you need to write symfony tasks in command line (on windows -cmd prompt).
As it is a simple example we are not going to configure a web server.

Continue reading ‘Symfony 1.2 - using sfForm with jquery validate plugin’

Zend Framework + Doctrine + jQuery Grid

Today i will show you how to put together: Zend Framework, Doctrine and simple jQuery Grid in easy way. All i want to do is to get some data from database with doctrine, format that data and send it to the template with Zend_Json:) Really nothing special.

Ok. Let’s start. First of all we need to create database schema.yml. It is realy easy country table:


Country:
  tableName: country
  columns:
    id:
      primary: true
      autoincrement: true
      type: integer(10)
    name: string(50)
    description: string(255)

Continue reading ‘Zend Framework + Doctrine + jQuery Grid’

Zend Framework + Doctrine - introduction

Some time ago i have shown you how to integrete Doctrine with our Zend Framework. Because it is really hard to say how much i hate the Zend_Db_Table ideology of working with database (i think it is not only my opinion), i will try to show you advantages of the Doctrine way. In this post I only want to give you some really easy introduction to Doctrine with Zend (it is just introduction without real world examples).

Doctrine

is an object relational mapper (ORM) for PHP 5.2.3 and later that sits on top of a powerful database abstraction layer (DBAL). One of its key features is the option to write database queries in a proprietary object oriented SQL dialect called Doctrine Query Language (DQL), inspired by Hibernates HQL. This provides developers with a powerful alternative to SQL that maintains flexibility without requiring unnecessary code duplication.
Continue reading ‘Zend Framework + Doctrine - introduction’

Symfony 1.1 - editing uploaded file with sfForm

Lately, i a had problem with editing uploaded file.
I had an object with field “photo” that was linking to the uploaded image.
When I was editing the object and leaving the input file blank (not selecting any other image) the form saved NULL in database.

I was looking for solution on many forums and in documentation but i didn’t found anything that could help me.
Finally, i solved the problem (maybe it’s not the best way, but it’s working really good).
Continue reading ‘Symfony 1.1 - editing uploaded file with sfForm’




About me:

  • PHP programmer
  • Symfony developer
  • Zend framework developer

Categories: