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.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

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

[Smarty docs]

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

[Smarty docs]

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:

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

[Smarty docs]

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

Installation

You can use Composer to install this application.


All versions of web-template-smarty with dependencies

PHP Build Version
Package Version
Requires nesbot/carbon Version ^2.0
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
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package ride/web-template-smarty contains the following files

Loading the files please wait ....