質問編集履歴
2
変更
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
cakephp3で何か投稿してフラッシュメソッドで文字列を表示したときに、そこにリンクのタグを張りたいのですが、
|
1
|
+
cakephp3で何か投稿してフラッシュメソッドで文字列を表示したときに、そこにリンクのタグを張りたいのですが、エスケープ処理されているようで、タグが使えません。
|
2
2
|
|
3
3
|
|
4
4
|
|
1
追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -3,3 +3,49 @@
|
|
3
3
|
|
4
4
|
|
5
5
|
どうしたらよいでしょうか。
|
6
|
+
|
7
|
+
|
8
|
+
|
9
|
+
```PHP
|
10
|
+
|
11
|
+
public function add()
|
12
|
+
|
13
|
+
{
|
14
|
+
|
15
|
+
$this->ViewBuilder()->layout('auth');
|
16
|
+
|
17
|
+
|
18
|
+
|
19
|
+
|
20
|
+
|
21
|
+
$article = $this->Articles->newEntity();
|
22
|
+
|
23
|
+
if ($this->request->is('post')) {
|
24
|
+
|
25
|
+
$article = $this->Articles->patchEntity($article, $this->request->data);
|
26
|
+
|
27
|
+
if ($this->Articles->save($article)) {
|
28
|
+
|
29
|
+
$this->Flash->success(__('投稿成功'));//ここにリンクタグを作りたい。
|
30
|
+
|
31
|
+
|
32
|
+
|
33
|
+
return $this->redirect(['action' => 'add']);
|
34
|
+
|
35
|
+
} else {
|
36
|
+
|
37
|
+
$this->Flash->error(__('投稿エラー'));
|
38
|
+
|
39
|
+
}
|
40
|
+
|
41
|
+
}
|
42
|
+
|
43
|
+
$users = $this->Articles->Users->find('list', ['limit' => 200]);
|
44
|
+
|
45
|
+
$this->set(compact('article', 'users'));
|
46
|
+
|
47
|
+
$this->set('_serialize', ['article']);
|
48
|
+
|
49
|
+
}
|
50
|
+
|
51
|
+
```
|