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``::
23
23
{
24
24
return $this->seoMetadata;
25
25
}
26
-
26
+
27
27
public function setSeoMetadata($metadata)
28
28
{
29
29
$this->seoMetadata = $metadata;
@@ -240,14 +240,30 @@ the ``SeoMetadata`` entity.
240
240
Form Type
241
241
---------
242
242
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
+ ;
245
254
246
255
.. caution ::
247
256
248
257
The form type requires the `BurgovKeyValueFormBundle `_ to be installed and
249
258
registered.
250
259
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
+
251
267
Sonata Admin Integration
252
268
------------------------
253
269
You can’t perform that action at this time.
0 commit comments