new $routes()
Service pour récupérer les routes d'affichage des ressources
- Source:
Methods
(static) get(action) → {string}
Retourne la route (sans préfixe de controleur ni slash de début) d'une action
Les arguments supplémentaires sont concaténé avec /
Parameters:
Name | Type | Description |
---|---|---|
action |
string |
- Source:
Returns:
La route
- Type
- string
(static) getAbs(action, ressourceopt, contextopt) → {string}
Retourne la route absolue (commence par /) d'une action (avec public ou ressource au début suivant la ressource)
Les arguments supplémentaires sont concaténé avec /
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
action |
string | (display|describe|preview) |
|
ressource |
Ressource | string |
<optional> |
ressource ou oid ou rid |
context |
Context |
<optional> |
pour vérifier que l'on est authentifié |
- Source:
Returns:
La route absolue
- Type
- string
(static) getTagA(actionName, ressource, labelopt) → {string}
Retourne un tag html a avec une url locale absolue (qui commence avec /)
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
actionName |
||||
ressource |
||||
label |
string |
<optional> |
ressource.nom | Le texte du lien |
- Source:
Returns:
Le code html du lien
- Type
- string
(static) addParam(url, key, value) → {string}
Retourne url complétée avec du (?|&)key=value (encode value au passage)
Parameters:
Name | Type | Description |
---|---|---|
url |
string | |
key |
string | |
value |
string | number |
- Source:
Returns:
- Type
- string