Hello, I’m Julian

Symfony3/Doctrine: Collections in Entity filtern

Mit Doctrine ist es jetzt möglich mit "Criteria" Collections direct über SQL in einer Getter-Funktion der Entity zu filtern.

namespace ...\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Criteria;
 * @ORM\Entity
class Parent {
     * @ORM\On...
Read more
Date: Fri, 09 Sep 2016 7:48:00

How to add a "Save and List" Action Button to Symfony Admin Generator Form.

To improve the workflow sometimes it may be better to redirect the user back to the list after the Save-action. This tutorial shows how to implement this in Symfony 1.3 and 1.4

First copy the "processForm"-function from the action.class.php in your cache-directory ( /cache/dev/modules/auto[Modulen...

Read more
Date: Mon, 15 Nov 2010 12:47:00
Author: Julian Stricker

Filter Admin-List in Symfony 1.4 + Doctrine

Some time ago I wrote an article about filtering the admin-list in Symfony 1.0 and Propel. Now in Symfony 1.4 and Doctrine the steps to do this are completely different:

First we have to change the auto-generated file in apps/[APP]/modules/[MODULE]/actions/actions.class.php and to add a function "...

Read more
Date: Wed, 31 Mar 2010 7:45:00
Author: Julian Stricker

Filter filename on fileupload and prevent execution of uploaded files

Its a good way to allways rename uploaded files using something like a MD5-hash and store the original filename in a database.
If for some reason you dont want to rename it using a hash, you should filter the filename using some code like this one:

$filename = strip_tags($_FILES["upload"]["name"]);
$filename = str_replace(array('|','<','>','"','\'',':','\','/','*','?'),'',$filename);

It's a good idea to deny the execution of all uploaded files: place a .htaccess file in your upload-directory:

RemoveHan… Read more

Date: Tue, 23 Jun 2009 8:50:00
Author: Julian Stricker

AIE AJAX Image Editor for Drupal

Today I found this great tutorial on how to integrate my AIE (Ajax Image Editor) into the Drupal imagefield module:


As expected, it seems to be pretty easy to integrate AIE into Drupal :-)

Read more
Date: Wed, 17 Jun 2009 12:29:00
Author: Julian Stricker

Symfony 1.0 Admin List: Highlight last edited entry

To highlight the last created or edited entry in a Admin-Generator-List copy the _list.php file from cache to your /apps/[APPNAME]/modules[MODULENAME]/templates directory and modify the code:

    getResults() as $mymodel): $odd = fmod(++$i, 2) ?>
      < tr c...
Read more
Date: Tue, 19 May 2009 9:48:00
Author: Julian Stricker

Symfony Sortable I18n-field in Admin-List

Works with Symfony 1.0. This Article shows how to make a I18n Field in a Symfony-Admin-List Sortable. In this example i use the "name"-field as I18n-field.

First, open the file apps/[APPNAME]/modules/[MODULENAME]/action/actions.class.php and add the function:

    protected function addSortCriter...
Read more
Date: Mon, 18 May 2009 11:50:00
Author: Julian Stricker

New version of jsThumbnailPlugin released

Today I have released version 1.1.0 of the jsThumbnailPlugin for the Symfony framework. It contains a important bugfix for Symfony 1.1 and a new feature.

I fixed a bug with the sfFileCache object: In version 1.0 the sfFileCache wants a string as $file_cache_dir parameter, but version 1.1 wants a A...

Read more
Date: Wed, 03 Dec 2008 16:37:00
Author: Julian Stricker

New great set of 24 Symfony tutorials

The Symfony team has released a new set of 24 tutorials published day-by-day between December 1st and Christmas, like the "Askeet tutorial" in 2005.

As for askeet, every day including week-ends, a new tutorial will be published. Each tutorial is meant to last about one hour, and will be the occasi...

Read more
Date: Tue, 02 Dec 2008 17:59:00
Author: Julian Stricker

New Symfony Plugin "jsThumbnailPlugin" for on-the-fly Thumbnails Creation

Today I have released my first plugin for the Symfony-Framework. The jsThumbnailPlugin creates Thumbnails on the fly using the GD library. It uses the Symfony cache system to cache the thumbnails.

Read more
Date: Tue, 04 Nov 2008 19:48:00
Author: Julian Stricker
Blog Comments powered by Disqus.