Skip to content
This repository has been archived by the owner on Jul 22, 2022. It is now read-only.

Commit

Permalink
adjust ListBuilder to twig filename cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
dbu committed Oct 12, 2013
1 parent 6642dde commit 1a7de93
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Builder/ListBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -149,19 +149,19 @@ public function fixFieldDescription(AdminInterface $admin, FieldDescriptionInter
$fieldDescription->setTemplate($this->getTemplate($fieldDescription->getType()));

if ($fieldDescription->getMappingType() == ClassMetadata::MANY_TO_ONE) {
$fieldDescription->setTemplate('SonataDoctrinePHPCRAdminBundle:CRUD:list_orm_many_to_one.html.twig');
$fieldDescription->setTemplate('SonataDoctrinePHPCRAdminBundle:CRUD:list_phpcr_many_to_one.html.twig');
}

if ($fieldDescription->getMappingType() == ClassMetadata::MANY_TO_MANY) {
$fieldDescription->setTemplate('SonataDoctrinePHPCRAdminBundle:CRUD:list_orm_many_to_many.html.twig');
$fieldDescription->setTemplate('SonataDoctrinePHPCRAdminBundle:CRUD:list_phpcr_many_to_many.html.twig');
}

if ($fieldDescription->getMappingType() == 'child' || $fieldDescription->getMappingType() == 'parent') {
$fieldDescription->setTemplate('SonataDoctrinePHPCRAdminBundle:CRUD:list_orm_one_to_one.html.twig');
$fieldDescription->setTemplate('SonataDoctrinePHPCRAdminBundle:CRUD:list_phpcr_one_to_one.html.twig');
}

if ($fieldDescription->getMappingType() == 'children' || $fieldDescription->getMappingType() == 'referrers') {
$fieldDescription->setTemplate('SonataDoctrinePHPCRAdminBundle:CRUD:list_orm_one_to_many.html.twig');
$fieldDescription->setTemplate('SonataDoctrinePHPCRAdminBundle:CRUD:list_phpcr_one_to_many.html.twig');
}
}

Expand Down

0 comments on commit 1a7de93

Please sign in to comment.