2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

CakePHP3 で BootstrapUIを導入する場合にControllerで指定する方法

2
Posted at

BootstrapUIの導入はここを参照
http://qiita.com/milano/items/f244f9ac5514f0e6b213

AppView.phpで指定すると全体に適用されるので、ControllerのActionごとで指定する場合、以下を書く

$this->viewBuilder()->layout('BootstrapUI.default');
$this->viewBuilder()->helpers(['BootstrapUI.Html', 'BootstrapUI.Form', 'BootstrapUI.Flash', 'BootstrapUI.Paginator']);

例)

class SamplesController extends AppController
{
    public function bootstarp(){

        $this->viewBuilder()->layout('BootstrapUI.default');
        $this->viewBuilder()->helpers(['BootstrapUI.Html', 'BootstrapUI.Form', 'BootstrapUI.Flash', 'BootstrapUI.Paginator']);

    }
}
2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?