Created
September 5, 2012 15:14
-
-
Save markuspoerschke/3638157 to your computer and use it in GitHub Desktop.
Translate value in SonataAdminBundle list
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class InvoiceAdmin extends Admin | |
{ | |
// ... | |
protected function configureListFields(ListMapper $list) | |
{ | |
$list | |
->addIdentifier('name') | |
// Use "trans" type to translate the given value | |
// EluceoInvoiceBundle_Status.**.xliff will be used for translation | |
->add('status', 'trans', array('catalogue' => 'EluceoInvoiceBundle_Status')) | |
->add('invoice_no') | |
->add('company') | |
->add('user'); | |
} | |
// ... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment