エントリーの編集

エントリーの編集は全ユーザーに共通の機能です。
必ずガイドラインを一読の上ご利用ください。
CakePHP3でController名,action名を取得する : 週末IT
記事へのコメント0件
- 注目コメント
- 新着コメント
このエントリーにコメントしてみましょう。
注目コメント算出アルゴリズムの一部にLINEヤフー株式会社の「建設的コメント順位付けモデルAPI」を使用しています

- バナー広告なし
- ミュート機能あり
- ダークモード搭載
関連記事
CakePHP3でController名,action名を取得する : 週末IT
CakePHP3でController名、action名を取得する方法。 1-1. Controller名を取得する 1-2. action名を取得... CakePHP3でController名、action名を取得する方法。 1-1. Controller名を取得する 1-2. action名を取得する1-1. Controller名を取得する Controller名を取得する方法はCakePHP2.xと同様。 ControllerまたはViewで$this->nameに入っている。 $controllerName = $this->name; これで取得できる。 1-2. action名を取得する action名を取得する方法は2系と異なる。 2系ではControllerまたはViewで$this->actionで取得できていたが、CakePHP3では $action = $this->request->action; これで取得。