1 | <?php |
||
20 | class TranslatableAdminExtension extends AbstractTranslatableAdminExtension |
||
21 | { |
||
22 | /** |
||
23 | * {@inheritdoc} |
||
24 | */ |
||
25 | public function alterNewInstance(AdminInterface $admin, $object) |
||
26 | { |
||
27 | if ($this->getTranslatableChecker()->isTranslatable($object)) { |
||
28 | $object->setLocale($this->getTranslatableLocale($admin)); |
||
29 | } |
||
30 | } |
||
31 | |||
32 | /** |
||
33 | * {@inheritdoc} |
||
34 | */ |
||
35 | public function alterObject(AdminInterface $admin, $object) |
||
41 | |||
42 | /** |
||
43 | * {@inheritdoc} |
||
44 | */ |
||
45 | public function preUpdate(AdminInterface $admin, $object) |
||
49 | |||
50 | /** |
||
51 | * {@inheritdoc} |
||
52 | */ |
||
53 | public function prePersist(AdminInterface $admin, $object) |
||
57 | } |
||
58 |