2016-04-21 46 views
-1
<?php echo $this->Form->postLink($this->Html->image("delete.png", array("alt"  => "Delete")), array('action' => 'delete', $personne['Personne']['id']),array('escape' => false) ,array('confirm' => __(' would you delete this personne # %s?', $personne['Personne']['id']))); ?> 

當我刪除圖像上單擊它告訴我[OBJET Objet公司]圖像:(我會有此消息「您將刪除此personne」CakePHP的2.x的刪除消息顯示[目標對象]

see this picture

回答

0

postLink方法的第四參數是字符串。| bool類型

你的代碼所指定的數組它這樣你所示的翻譯:

<?php echo $this->Form->postLink($this->Html->image("delete.png", array("alt" => "Delete")), array('action' => 'delete', $personne['Personne']['id']),array('escape' => false) , __(' would you delete this personne # %s?', $personne['Personne']['id'])); ?> 
+0

我該怎麼辦? PLZ幫助我:( – wah

+0

從confirmMessage參數刪除數組(012)。。。。。。。。。。。。。。。。。。。。。。。。。。。 >'Delete')),array('action'=>'delete',$ personne ['Personne'] ['id']),array('escape'=> false),__('你會刪除這個人#%s?',$ personne ['Personne'] ['id']));?> –

+0

非常感謝你:* it work:D – wah