sonata-project/SonataDoctrinePhpcrAdminBundle — Issue #15: document type guessing
Author: dbu
Created: 2011-12-20 15:24:39+00:00
State: open

admin classes need the configureFormFields method. when i renamed the storage name for 'content' to 'body', but let the getter and setter at set/getContent, i noticed that i need to specify the type and before it was guessed. this should be documented a bit - and maybe there is even a way for me to specify the phpcr name to get the type from instead of the type itself?

protected function configureFormFields(FormMapper $formMapper)
{
$formMapper
->with('General')
->add('path', 'text')
->add('title')
->add('name')
->add('content', 'text') // without 'text', the form can not be built if the node does not have a property $content
->end();
}