Created
July 26, 2012 08:06
-
-
Save leopro/3180885 to your computer and use it in GitHub Desktop.
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
{% extends 'SonataAdminBundle:CRUD:base_list_field.html.twig' %} | |
{% block field%} | |
<div> | |
{{ object }} | |
</div> | |
{% endblock %} |
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
<?php | |
class NewsAdmin extends BaseAdmin | |
{ | |
protected function configureFormFields(FormMapper $formMapper) | |
{ | |
$formMapper | |
->with('Text', array('collapsed' => false)) | |
->add('translations', 'collection', array('type' => new NewsI18nType())) | |
->end(); | |
; | |
} | |
public function configureListFields(ListMapper $listMapper) | |
{ | |
$listMapper | |
->addIdentifier('title', 'string', array('template' => 'VallatiAdminBundle:Admin:list_custom.html.twig')) | |
->add('_action', 'actions', array( | |
'actions' => array( | |
'edit' => array(), | |
'delete' => array(), | |
) | |
)) | |
; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment