1
1
Saving the SeoMetadata in the Object
2
2
====================================
3
3
4
- The ``SeoMetadata `` can be saved in the object , so you can persist it into the
5
- database. This option gives admins the possibility of changing the SEO data for
6
- the document .
4
+ The ``SeoMetadata `` can be set on your model classes , so that you can persist
5
+ it into the database. This option gives admins the possibility to change the SEO
6
+ data for the object .
7
7
8
- In order to save the ``SeoMetadata `` in the object , the object should
8
+ In order to save the ``SeoMetadata `` in the model , the object should
9
9
implement the ``SeoAwareInterface ``. This requires a getter and a setter for
10
10
the ``SeoMetadata ``::
11
11
@@ -32,8 +32,8 @@ the ``SeoMetadata``::
32
32
33
33
.. tip ::
34
34
35
- If you are using PHP5.4+ you may also benefit from using the trait `` SeoAwareTrait ``
36
- to plug these behavior into your model.
35
+ Instead of implementing these methods yourself, you can also use the trait
36
+ `` SeoAwareTrait `` to enable this behavior in your model.
37
37
38
38
Now you can set some SEO data for this ``Page `` using the metadata::
39
39
@@ -91,7 +91,7 @@ To be able to use this document, you have to enable the PHPCR persistence:
91
91
bundle. See :doc: `the CoreBundle docs <../core/persistence >` for more
92
92
information.
93
93
94
- After you've enabled PHPCR, map ``$seoMetadata `` as a child:
94
+ After you have enabled PHPCR, map ``$seoMetadata `` as a child:
95
95
96
96
.. configuration-block ::
97
97
@@ -178,7 +178,7 @@ And after that, you can use the
178
178
Doctrine ORM
179
179
------------
180
180
181
- You can also use the Doctrine ORM with the CmfSeoBundle. You can just use the
181
+ You can also use the Doctrine ORM with the CmfSeoBundle. Use the
182
182
``Symfony\Cmf\Bundle\SeoBundle\SeoMetadata `` class and map it as an
183
183
object:
184
184
@@ -240,9 +240,9 @@ the ``SeoMetadata`` entity.
240
240
Form Type
241
241
---------
242
242
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::
243
+ The bundle also provides a special form type called
244
+ `` Symfony\Cmf\Bundle\SeoBundle\Form\Type\SeoMetadataType ``. This form type can
245
+ be used in forms to edit the ``SeoMetadata `` object::
246
246
247
247
use Sonata\AdminBundle\Form\FormMapper;
248
248
use Symfony\Cmf\Bundle\SeoBundle\Form\Type\SeoMetadataType;
@@ -264,17 +264,9 @@ used in forms to edit the ``SeoMetadata`` object::
264
264
option is set by default, otherwise you need to explicitly specify it in
265
265
your ORM forms.
266
266
267
- Sonata Admin Integration
268
- ------------------------
269
-
270
- Besides providing a form type, the bundle also provides a Sonata Admin
271
- Extension. This extension adds a field for the ``SeoMetadata `` when an admin
272
- edits an object that implements the ``SeoAwareInterface `` in the Sonata Admin
273
- panel.
274
-
275
- .. caution ::
267
+ .. tip ::
276
268
277
- The Sonata Admin uses the Form Type provided by the CmfSeoBundle, make
278
- sure you have the `BurgovKeyValueFormBundle `_ installed .
269
+ The :doc: ` SonataPhpcrAdminIntegrationBundle < ../sonata_phpcr_admin_integration/seo >`
270
+ provides an admin extension for the `` SeoAwareInterface `` .
279
271
280
272
.. _`BurgovKeyValueFormBundle` : https://github.com/Burgov/KeyValueFormBundle
0 commit comments