Download the PHP package ride/web-template-smarty without Composer
On this page you can find all versions of the php package ride/web-template-smarty. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ride/web-template-smarty
More information about ride/web-template-smarty
Files in ride/web-template-smarty
Package web-template-smarty
Short Description Smarty template integration for the base web application of the Ride framework
License MIT
Informations about the package web-template-smarty
Ride: Template (Smarty)
This module adds template blocks, functions and modifiers for a Ride application to Smarty.
Block functions
isGranted
Parse block content if the specified route/url/permission is allowed.
Parameter | Type | Description |
---|---|---|
route | String | Path to check for allowance. |
url | String | URL to check for allowance. |
permission | String | Permission code to check for allowance. |
strategy | String | AND or OR when checking more then one of the above checks. |
var | String | Variable to assign the result to. (true if this block content will be printed, false otherwise) |
Note: The content of this block is always rendered. If the content is used for logic, assign the grant to a var and use an if statement.
isNotGranted
Parse block content if the specified route/url/permission is not allowed.
Parameter | Type | Description |
---|---|---|
route | String | Path to check for allowance. |
url | String | URL to check for allowance. |
permission | String | Permission code to check for allowance. |
strategy | String | AND or OR when checking more then one of the above checks. |
var | String | Variable to assign the result to. (true if this block content will be printed, false otherwise) |
Note: The content of this block is always rendered. If the content is used for logic, assign the grant to a var and use an if statement.
Template functions
apiMethodParameters
apiType
image
Return the URL of a transformed image.
Parameter | Type | Description |
---|---|---|
src | String | Source url or file for this image. |
default | String | Fallback for src parameter. |
transformation | String | Name of the transformation. |
var | String | Variable name to assign this URL to. |
thumbnail | --- | Deprecated |
:warning: Transformations may require additional parameters.
For more information about the transformations and their parameters, check out ride-lib-image.
parsley
Adds parsley data attributes to the attributes of a form widget.
Parameter | Type | Description |
---|---|---|
type | string | Type of the form row widget |
validators | Array | Validators of a form row |
var | String | Variable name to assign the updated attributes to. |
tableVars
Add these FormTable variables to the template:
$tableNameField
$tableActionField
$tableIdField
$tableOrderField
$tableSearchQueryField
$tablePageRowsField
translate
Translate a key using the i18n translator.
Parameter | Type | Description |
---|---|---|
key | String | Translation key. |
locale | String | Translation locale. |
n | Integer | Number of items for a translation that describes multiple items. |
var | String | Variable name to assign the translated key to. |
:warning: When simply translating a key, using the {$key|translate}
modifier syntax is preferred.
url
Create an URL.
Parameter | Type | Description |
---|---|---|
id | String | Route ID. |
parameters | Array | Path arguments for the URL. |
query | Array | Query parameters. |
separator | String | Seperator for query parameters. (defaults to & ) |
var | String | Variable name to assign the URL to. |
object | Boolean | Return URL Object instead of String. (defaults to false ) |
Modifiers
decorate
Parameter | Type | Description |
---|---|---|
String | ID of the decorator. |
Common decorator IDs: storage.size
/ time
/ date.format
/ file
/ file.extension
/ file.size
safe
Modify a string value to safely use it as a file name, URL, id etc.
translate
Parameter | Type | Description |
---|---|---|
Array | Variables to be replaced in the translation. |
Related Modules
- ride/app
- ride/app-image
- ride/app-template
- ride/app-template-smarty
- ride/lib-api
- ride/lib-image
- ride/lib-i18n
- ride/lib-router
- ride/lib-security
- ride/lib-template
- ride/lib-template-smarty
- ride/web
- ride/web-api
- ride/web-security
- ride/web-template
Installation
You can use Composer to install this application.
All versions of web-template-smarty with dependencies
ride/app Version ^1.0.0
ride/app-template Version ^1.0.0
ride/app-template-smarty Version ^2.0.0
ride/lib-common Version ^1.0.0
ride/lib-html Version ^1.0.0
ride/web Version ^1.0.0
ride/web-i18n Version ^1.0.0
ride/web-image Version ^1.0.0