Skip to content
This repository was archived by the owner on Sep 16, 2021. It is now read-only.

Commit c087c4c

Browse files
authored
Merge pull request #774 from symfony-cmf/1.3
1.3 to master
2 parents da43280 + 4babfcc commit c087c4c

File tree

1 file changed

+19
-3
lines changed

1 file changed

+19
-3
lines changed

bundles/seo/seo_aware.rst

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ the ``SeoMetadata``::
2323
{
2424
return $this->seoMetadata;
2525
}
26-
26+
2727
public function setSeoMetadata($metadata)
2828
{
2929
$this->seoMetadata = $metadata;
@@ -240,14 +240,30 @@ the ``SeoMetadata`` entity.
240240
Form Type
241241
---------
242242

243-
The bundle also provides a special form type called ``seo_metadata``. This
244-
form type can be used in forms to edit the ``SeoMetadata`` object.
243+
The bundle also provides a special form type called ``Symfony\Cmf\Bundle\SeoBundle\Form\Type\SeoMetadataType``
244+
(use ``seo_metadata`` for Symfony versions older than 2.8). This form type can be
245+
used in forms to edit the ``SeoMetadata`` object::
246+
247+
use Sonata\AdminBundle\Form\FormMapper;
248+
use Symfony\Cmf\Bundle\SeoBundle\Form\Type\SeoMetadataType;
249+
250+
/** @var FormMapper $formMapper */
251+
$formMapper
252+
->add('seoMetadata', SeoMetadataType::class)
253+
;
245254

246255
.. caution::
247256

248257
The form type requires the `BurgovKeyValueFormBundle`_ to be installed and
249258
registered.
250259

260+
.. note::
261+
262+
If you use Doctrine ORM, you need the form option ``by_reference`` set to
263+
``false``. If you enabled the ORM backend but not the PHPCR backend, this
264+
option is set by default, otherwise you need to explicitly specify it in
265+
your ORM forms.
266+
251267
Sonata Admin Integration
252268
------------------------
253269

0 commit comments

Comments
 (0)