Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix grammar, use App instead of AppBundle #726

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions docs/translatable.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,19 +122,19 @@ $category->translate('en')->getName();

In case you prefer to use a different class name for the translation entity, or want to use a separate namespace, you have 2 ways:

If you want to define a custom translation entity class name globally: Override the trait `Translatable` and his method `getTranslationEntityClass` and the trait `Translation` and his method `getTranslatableEntityClass` in the translation entity.
If you want to define a custom translation entity class name globally: Override the trait `Translatable` and its method `getTranslationEntityClass` and the trait `Translation` and its method `getTranslatableEntityClass` in the translation entity.

If you override one, you also need to override the other to return the inverse class.

Example: Let's say you want to create a sub namespace AppBundle\Entity\Translation to stock translations classes
Example: Let's say you want to create a sub namespace App\Entity\Translation to stock translations classes
then put overrided traits in that folder.

```php
<?php

declare(strict_types=1);

namespace AppBundle\Behavior;
namespace App\Behavior;

use Knp\DoctrineBehaviors\Model\Translatable\TranslatableTrait;

Expand All @@ -157,7 +157,7 @@ trait TranslatableTrait

declare(strict_types=1);

namespace AppBundle\Behavior;
namespace App\Behavior;

use Knp\DoctrineBehaviors\Model\Translatable\TranslationTrait;

Expand Down Expand Up @@ -228,4 +228,4 @@ No joins are created. Only the query strategy is changed.
|------------|------------------------------------------------------------------------------------------------------------------------------------|
| EAGER | Doctrine always loads the translation. |
| LAZY | Doctrine only loads the translation if it's actually used. |
| EXTRA_LAZY | Doctrine only loads the translation if the data is specifically queried. Count and/or contains queries do not trigger new queries. |
| EXTRA_LAZY | Doctrine only loads the translation if the data is specifically queried. Count and/or contains queries do not trigger new queries. |