Layout::of()
Returns the layout definition.
Table of Contents
Description
Layout::of(array $keys): ?callable|string;
Layout::of(string $key): ?callable|string;
This method returns the layout definition that was previously set by the Layout::set()
method.
Example
Layout::set('header', '.\path\to\layout.php');
Layout::set('nav', static function (string $key, array $lot = []) {
return '<nav>…</nav>';
});
test(Layout::of('header')); // Returns `'.\path\to\layout.php'`
test(Layout::of('nav')); // Returns `Closure::__set_state([ … ])`
Layout::__callStatic()
Calls a virtual method statically.
Layout::get()
Loads a layout file, or executes a layout function.
Layout::let()
Deletes a layout key or layout keys.
Layout::of()
Returns the layout definition.
Layout::path()
Resolves a layout key or layout keys to a file path.
Layout::set()
Sets a layout definition.