Archive for December, 2011

Extending Nette Debugger

Nette Debugger (or Laďenka by it's Czech beautiful name) is very helpful when solving problems, because it displays exceptions in a lovely way. Sometimes it's not enough though and you'd like to see even more, which is absolutely relevant and possible. Exception details You can register panels, which are just callbacks executed when an uncaught exception is […]

Entity Select-boxes & Nette

Forms often contain a selection, e.g. when creating a user for in your app, you may need a role to be selected. If you use an ORM, you'd probably have IdentityEntity class in your app referring to an RoleEntity class. How will you create such a form? By adding plain select and converting Role Entity […]

Article::getClassName() or Article::className

I miss a feature in PHP, which would allow me to reference classes easily. For example in Java, if you have a class cz.juzna.abc.Acticle and you want to give it to a variable/method, you can reference it by cz.juzna.abc.Acticle.class. In PHP, this can be done only by a string with class' name („cz\juzna\abc\Article“), which is however […]

Data binding in Nette Forms

A form in your app sometimes match exactly to fields of one entity, but it's not always the case. This data-binding should be more general, e.g. one form can provide editing of a hierarchy of entities at once. And it should be bi-directional, pulling data from model and also storing it back. Usually you need to write lot's of […]