BcBaserHelper::includeCore PHP Method

includeCore() public method

コントローラー名より指定が必要 《利用例》 $this->BcBaser->includeCore('Users/admin/form') $this->BcBaser->includeCore('Mail.MailFields/admin/form')
public includeCore ( string $name, array $data = [], array $options = [] ) : void
$name string テンプレート名
$data array 読み込むテンプレートに引き継ぐパラメータ(初期値 : array())
$options array オプション(初期値 : array()) - `subDir` : テンプレートの配置場所についてプレフィックスに応じたサブフォルダを利用するかどうか(初期値 : true) ※ その他のパラメータについては、View::element() を参照
return void
    public function includeCore($name, $data = array(), $options = array())
    {
        $options = array_merge($options, array('subDir' => false));
        $plugin = '';
        if (strpos($name, '.') !== false) {
            list($plugin, $name) = explode('.', $name);
            $plugin = Inflector::camelize($plugin);
            $name = '../../../lib/Baser/Plugin/' . $plugin . '/View/' . $name;
        } else {
            $name = '../../../lib/Baser/View/' . $name;
        }
        $this->element($name, $data, $options);
    }