protected function _getLayoutFileName($name = null)
    {
        if ($name === null) {
            $name = $this->layout;
        }
        $subDir = null;

        if ($this->layoutPath) {
            $subDir = $this->layoutPath . DIRECTORY_SEPARATOR;
        }
        list($plugin, $name) = $this->pluginSplit($name);

        $layoutPaths = $this->_getSubPaths('Layout' . DIRECTORY_SEPARATOR . $subDir);

        foreach ($this->_paths($plugin) as $path) {
            foreach ($layoutPaths as $layoutPath) {
                $currentPath = $path . $layoutPath;
                if (file_exists($currentPath . $name . $this->_ext)) {
                    return $this->_checkFilePath($currentPath . $name . $this->_ext, $currentPath);
                }
            }
        }
        throw new MissingLayoutException([
            'file' => $layoutPaths[0] . $name . $this->_ext
        ]);
    }
protected function _getLayoutFileName($name = null)
    {
        if ($name === null) {
            $name = $this->layout;
        }
        $subDir = null;

        if ($this->layoutPath) {
            $subDir = $this->layoutPath . DIRECTORY_SEPARATOR;
        }
        list($plugin, $name) = $this->pluginSplit($name);

        $layoutPaths = $this->_getSubPaths('Layout' . DIRECTORY_SEPARATOR . $subDir);

        foreach ($this->_paths($plugin) as $path) {
            foreach ($layoutPaths as $layoutPath) {
                $currentPath = $path . $layoutPath;
                if (file_exists($currentPath . $name . $this->_ext)) {
                    return $this->_checkFilePath($currentPath . $name . $this->_ext, $currentPath);
                }
            }
        }
        throw new MissingLayoutException([
            'file' => $layoutPaths[0] . $name . $this->_ext
        ]);
    }
protected function _getLayoutFileName ( $ name = null ) { if ( $ name === null ) { $ name = $ this -> layout ; } $ subDir = null ; if ( $ this -> layoutPath ) { $ subDir = $ this -> layoutPath . DIRECTORY_SEPARATOR ; } list ( $ plugin , $ name ) = $ this -> pluginSplit ( $ name ) ; $ layoutPaths = $ this -> _getSubPaths ( 'Layout' . DIRECTORY_SEPARATOR . $ subDir ) ; foreach ( $ this -> _paths ( $ plugin ) as $ path ) { foreach ( $ layoutPaths as $ layoutPath ) { $ currentPath = $ path . $ layoutPath ; if ( file_exists ( $ currentPath . $ name . $ this -> _ext ) ) { return $ this -> _checkFilePath ( $ currentPath . $ name . $ this -> _ext , $ currentPath ) ; } } } throw new MissingLayoutException ( [ 'file' => $ layoutPaths [ 0 ] . $ name . $ this -> _ext ] ) ; }
Returns layout filename for this template as a string.

@param string|null $name The name of the layout to find.
@return string Filename for layout file (.ctp).
@throws \Cake\View\Exception\MissingLayoutException when a layout cannot be located
Returns layout filename for this template as a string .