Download the PHP package blat/slim-plates without Composer
On this page you can find all versions of the php package blat/slim-plates. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package slim-plates
Slim Framework Plates View
This is a Slim Framework view helper built on top of the Plates templating component. You can use this component to create and render templates in your Slim Framework application.
Install
Via Composer
Requires Slim Framework 4, Plates 3 and PHP 7.4 or newer.
Usage
Custom template functions
PlatesExtension
provides these functions to your Plates templates:
urlFor()
- returns the URL for a given route. e.g.: /hello/worldfullUrFor()
- returns the URL for a given route. e.g.: http://www.example.com/hello/worldisCurrentUrl()
- returns true is the provided route name and parameters are valid for the current path.currentUrl()
- returns the current path, with or without the query string.basePath()
- returns the base path.
You can use urlFor
to generate complete URLs to any Slim application named route and use isCurrentUrl
to determine if you need to mark a link as active as shown in this example Plates template:
The MIT License (MIT)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
All versions of slim-plates with dependencies
php Version ^7.4 || ^8.0
psr/http-message Version ^1.0
slim/slim Version ^4.10