sábado, 30 de janeiro de 2016

Lines of the tutorial are incomplete - Page 90 - CakePHP Cookbook

Hi!

I found this problem when I was studying the tutorial

CakePHP Cookbook Documentation
Release 3.x
Cake Software Foundation
January 18, 2016

<td><?= $category->id ?></td>
<td><?= $category->parent_id ?></td>
<td><?= $category->lft ?></td>
<td><?= $category->rght ?></td>
<td><?= h($category->name) ?></td>
<td><?= h($category->description) ?></td>
<td><?= h($category->created) ?></td>
<td class="actions">
<?= $this->Html->link(__('View'), ['action' => 'view', $category->id]) ?>
<?= $this->Html->link(__('Edit'), ['action' => 'edit', $category->id]) ?>
<?= $this->Form->postLink(__('Delete'), ['action' => 'delete', $category->id], 
<?= $this->Form->postLink(__('Move down'), ['action' => 'moveDown', $category->
<?= $this->Form->postLink(__('Move up'), ['action' => 'moveUp', $category-></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>

Correction

    <?= $this->Html->link(__('View'), ['action' => 'view', $category->id]) ?>
    <?= $this->Html->link(__('Edit'), ['action' => 'edit', $category->id]) ?>
    <?= $this->Form->postLink(__('Delete'), ['action' => 'delete', $category->id]) ?>
    <?= $this->Form->postLink(__('Move down'), ['action' => 'moveDown', $category->id]) ?>
    <?= $this->Form->postLink(__('Move up'), ['action' => 'moveUp', $category->id]) ?>

Good luck!

Nenhum comentário:

Postar um comentário