# Using block¶

Note

This article outdated and may contain information that are not in use any more

To add a property of type grid to your resource model, add a one-to-one association to your doctrine definition and update your entity.

oneToOne:
grid:
targetEntity: Enhavo\Bundle\GridBundle\Model\GridInterface

<?php

//...

class Foo {

//...



## Types of grid¶

If you don’t add any options, all item types configured in app/config/enhavo.yml will be available in the form. You can restrict the available types by setting the option items.

\$builder->add('grid', 'enhavo_grid', array(
'items' => array(
array('type' => 'text'),
array('type' => 'picture', 'label' => 'Picture'),
array('type' => 'video', 'label' => 'label.video', 'translationDomain' => 'AcmeFooBundle')
)
));


The parameter label is optional, its default value can be configured in app/config/enhavo.yml. The parameter translationDomain defaults to “EnhavoGridBundle” if it is not set.