Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit bdedb46

Browse files
author
Thomas Rabaix
committedMay 17, 2011
fix error due to the fluid interface
1 parent 1360217 commit bdedb46

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed
 

‎Resources/views/CRUD/edit_orm_one_to_many.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ file that was distributed with this source code.
1818
{% if inline == 'table' %}
1919
<table>
2020
<tbody class="sonata-ba-tbody">
21-
{{ field_element.setrendered }}
21+
{% set dummy = field_element.setrendered %}
2222
{% for nested_group_field_name, nested_group_field in field_element.children %}
2323
<tr>
2424
{% for field_name, nested_field in nested_group_field.children %}

‎Twig/Extension/SonataAdminExtension.php

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public function getName()
5858
/**
5959
* render a list element from the FieldDescription
6060
*
61-
* @param $object
61+
* @param mixed $object
6262
* @param \Sonata\AdminBundle\Admin\FieldDescriptionInterface $fieldDescription
6363
* @param array $params
6464
* @return
@@ -78,7 +78,12 @@ public function renderListElement($object, FieldDescriptionInterface $fieldDescr
7878

7979
public function output(FieldDescriptionInterface $fieldDescription, $content)
8080
{
81-
return sprintf("\n<!-- fieldName: %s, template: %s -->\n%s\n", $fieldDescription->getFieldName(), $fieldDescription->getTemplate(), $content);
81+
return sprintf("\n<!-- START - fieldName: %s, template: %s -->\n%s\n<!-- END - fieldName: %s -->",
82+
$fieldDescription->getFieldName(),
83+
$fieldDescription->getTemplate(),
84+
$content,
85+
$fieldDescription->getFieldName()
86+
);
8287
}
8388

8489
/**
@@ -134,7 +139,7 @@ public function renderFilterElement(FilterInterface $filter, array $params = arr
134139
* @throws InvalidArgumentException
135140
* @param \Sonata\AdminBundle\Admin\FieldDescriptionInterface $fieldDescription
136141
* @param \Sumfony\Component\Form\FormView $formView
137-
* @param $object
142+
* @param mixed $object
138143
* @param array $params
139144
* @return string
140145
*/

0 commit comments

Comments
 (0)
Please sign in to comment.