如何向此代码添加类?CakePHP 3.0 - 发布链接 - 添加一个类删除警报确认功能
$this->Form->postLink(
__('Delete'),
['action' => 'delete', $user->id],
['confirm' => __('Are you sure you want to delete # {0}?', $user->id)]
)
当我添加一个类的“确认功能”消失。
$this->Form->postLink(
__('Delete'),
['action' => 'delete', $user->id],
['class' => 'btn btn-danger'],
['confirm' => __('Are you sure you want to delete # {0}?', $user->id)]
)
告诉我们在哪儿,你增加了一个类的代码。 – FrankerZ
= $this-> Form-> postLink(__('Delete'),['action'=>'delete',$ user-> id],['class'=>'btn btn-danger'],['confirm'= > __('你确定要删除#{0}?',$ user-> id)])?> –