In View(CakePHP), the proper way to get current controller?

前端 未结 8 869
伪装坚强ぢ
伪装坚强ぢ 2021-02-02 07:36

In View, I can get action by using

$this->action

But, I cannot get controller name by

$this->controller
8条回答
  •  故里飘歌
    2021-02-02 08:14

    To get the current,

    • controller: $this->params['controller']
    • action: $this->params['action']
    • arguments:$this->params['pass']

提交回复
热议问题