$object_manager->persist($site);
$object_manager->flush();
$this->addFlash('success', 'Everything is ok');
return $this->redirectToRoute( 'modify', [
'id' => $site->getIdSite(),
]);
if(isset($pages)){
if(isset($_POST)){
$em = $this->getDoctrine()->getManager();
$value = $_POST;
unset($value["x"]);
unset($value["y"]);
dump($value); /*die;*/
for ($i =0; isset(array_values($value)[$i]); $i++) {
if (array_values($value)[$i])
{
$Page = $this->getDoctrine()->getRepository(Page::class)->find(array_keys($value)[$i]);
if($value!=null)
$Page->setOrdre(array_values($value)[$i]);
}
}
$em->flush();
return $this->redirectToRoute('modifier', [ // добавил это
'id' => $site->getIdSite()
]);
}
}
$book = $this->getDoctrine()->getRepository(mySite::class)->find($id_book); // recover an object of $book - all that is contained in a given book with corresponding id
$title=$book->getTitle(); // recover a title from $book
$description=$book->getDescription(); // recover a description from $book
$post = new mySite();
$post->setTitle($title);
$post->setDescription($description);
<style>
.list
tr:nth-child(even) {
background: #E0DDF0 /*#3399ff*/;
}
</style>
<table class="list">
<thead>
<tr>
<td align="left"><font color="#1E4262"><h2>List of books</h2></font></td>
<td></td>
</tr>
<tr>
<th style="width: 350px;">
Name
</th>
<th style="width: 110px;">
Writer
</th>
<th style="width: 110px;">
Date
</th>
<th colspan="5" style="width: 45px;">
Actions
</th>
</tr>
</thead>
{% for d in titles %}
<tbody>
<tr >
<td class="listLeft" >
{{ d.title | upper }}
</td>
<td>
{{ d.idUser.name }}
</td>
<td>
{{ d.dateCreation | date ('d-m-Y') }}
</td>
</tr>
</tbody>
{% endfor %}
</table>
У меня в настоящий момент так (сообщение наверху) а надо чтобы сообщение появилось внизу (там где пустая рамка).
Извините если глупые вопросы задаю. Спасибо