Code snippets for symfony 1.x

Navigation

Refine Tags

Snippets tagged "model doctrine modul"

script for to generate (all) modules

This Bash script transform: 'BaseModel.class.php' => 'BaseModel' => 'Model' then call doctrine:generate-admin frontend 'Model', for all files from lib/model/doctrine/base.

#!/bin/bash
for file_class in `ls lib/model/doctrine/base`  do
    base_model=${file_class/%.class.php/}      
    model=${base_model/#Base/}                 
    ./symfony doctrine:generate-admin --env="prod" frontend $model
done
 
by Vlad Bazon on 2010-08-01, tagged bash  doctrine  generateadmin  model  modul  symfony