This repository was archived by the owner on Sep 16, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +19
-3
lines changed
Expand file tree Collapse file tree 1 file changed +19
-3
lines changed Original file line number Diff line number Diff 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.
240240Form 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+
251267Sonata Admin Integration
252268------------------------
253269
You can’t perform that action at this time.
0 commit comments