Skip to content

Instantly share code, notes, and snippets.

@leopro
Created July 26, 2012 08:06
Show Gist options
  • Save leopro/3180885 to your computer and use it in GitHub Desktop.
Save leopro/3180885 to your computer and use it in GitHub Desktop.
{% extends 'SonataAdminBundle:CRUD:base_list_field.html.twig' %}
{% block field%}
<div>
{{ object }}
</div>
{% endblock %}
<?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