# \Thelia\Core\Template\Smarty\PluginsUrlGenerator

The class all Smarty Thelia plugin shoud extend

Class AbstractSmartyPlugin

## Summary

Methods
Properties
Constants
__construct()
generateUrlFunction()
generateFrontViewUrlFunction()
generateAdminViewUrlFunction()
getPluginDescriptors()
getNormalizedParam()
getParam()
No public properties found
No constants found
generateViewUrlFunction()
_explode()
$request
N/A
getArgsFromParam()
No private properties found
N/A

File
  Core/Template/Smarty/Plugins/UrlGenerator.php
Package
  \Default
Class hierarchy
  \Thelia\Core\Template\Smarty\AbstractSmartyPlugin
  \Thelia\Core\Template\Smarty\Plugins\UrlGenerator

## Tags

None found

## Properties

### $request

    $request

#

## Tags

None found

## Methods

### __construct()

    __construct(\Thelia\Core\HttpFoundation\Request $request)

#### Parameters

\Thelia\Core\HttpFoundation\Request | $request |

#

## Tags

None found

### generateUrlFunction()

    generateUrlFunction(array $params, \Thelia\Core\Template\Smarty\Plugins\unknown $smarty) : string

Process url generator function

#### Parameters

array | $params |
\Thelia\Core\Template\Smarty\Plugins\unknown | $smarty |

#### Returns

string —

no text is returned.

#

## Tags

None found

### generateFrontViewUrlFunction()

    generateFrontViewUrlFunction(array $params, \Thelia\Core\Template\Smarty\Plugins\unknown $smarty) : string

Process view url generator function

#### Parameters

array | $params |
\Thelia\Core\Template\Smarty\Plugins\unknown | $smarty |

#### Returns

string —

no text is returned.

#

## Tags

None found

### generateAdminViewUrlFunction()

    generateAdminViewUrlFunction(array $params, \Thelia\Core\Template\Smarty\Plugins\unknown $smarty) : string

Process administration view url generator function

#### Parameters

array | $params |
\Thelia\Core\Template\Smarty\Plugins\unknown | $smarty |

#### Returns

string —

no text is returned.

#

## Tags

None found

### getPluginDescriptors()

    getPluginDescriptors() : \Thelia\Core\Template\Smarty\an

#### Returns

\Thelia\Core\Template\Smarty\an —

array of SmartyPluginDescriptor

#

abstract

Inherited from
  \Thelia\Core\Template\Smarty\AbstractSmartyPlugin

## Tags

None found

### getNormalizedParam()

    getNormalizedParam(array $params, mixed $name, mixed $default) : mixed

Get a function or block parameter value, and normalize it, trimming balnks and making it lowercase

#### Parameters

array | $params | the parameters array
mixed | $name | as single parameter name, or an array of names. In this case, the first defined parameter is returned. Use this for aliases (context, ctx, c)
mixed | $default | the defaut value if parameter is missing (default to null)

#### Returns

mixed —

the parameter value, or the default value if it is not found.

#

Inherited from
  \Thelia\Core\Template\Smarty\AbstractSmartyPlugin

## Tags

None found

### getParam()

    getParam(array $params, mixed $name, mixed $default) : mixed

Get a function or block parameter value

#### Parameters

array | $params | the parameters array
mixed | $name | as single parameter name, or an array of names. In this case, the first defined parameter is returned. Use this for aliases (context, ctx, c)
mixed | $default | the defaut value if parameter is missing (default to null)

#### Returns

mixed —

the parameter value, or the default value if it is not found.

#

Inherited from
  \Thelia\Core\Template\Smarty\AbstractSmartyPlugin

## Tags

None found

### generateViewUrlFunction()

    generateViewUrlFunction( $params,  $forAdmin)

#### Parameters

| $params |
| $forAdmin |

#

## Tags

None found

### _explode()

    _explode(\Thelia\Core\Template\Smarty\unknown $commaSeparatedValues) : \Thelia\Core\Template\Smarty\multitype:

Explode a comma separated list in a array, trimming all array elements

#### Parameters

\Thelia\Core\Template\Smarty\unknown | $commaSeparatedValues |

#### Returns

\Thelia\Core\Template\Smarty\multitype:

#

Inherited from
  \Thelia\Core\Template\Smarty\AbstractSmartyPlugin

## Tags

None found

### getArgsFromParam()

    getArgsFromParam(array $params,  $exclude) : array

Get URL parameters array from parameters.

#### Parameters

array | $params | Smarty function params
| $exclude |

#### Returns

array —

the parameters array (either emply, of valued)

#

## Tags

None found

### UrlGenerator.php