Function DatabaseConnector->translate_field_join
Definitions
sources/database.php
- Create a join into the translate table, with a preference to language-matched translations but fall-back.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: string
Parameters
Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
---|---|---|---|---|---|---|---|
$field | ID_TEXT | No | No | required parameter | N/A | N/A | Field name of what we are joining against |
$join_alias | string | No | No | t | N/A | N/A | Join alias |
$lang | ?LANGUAGE_NAME | No | No | Null | N/A | N/A | Language (null: current language) |
$join_type | string | No | No | LEFT JOIN | N/A | N/A | Join type |
Returns
- Join SQL
- Type: string
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Create a join into the translate table, with a preference to language-matched translations but fall-back.
*
* @param ID_TEXT $field Field name of what we are joining against
* @param string $join_alias Join alias
* @param ?LANGUAGE_NAME $lang Language (null: current language)
* @param string $join_type Join type
* @return string Join SQL
*/
public function translate_field_join(string $field, string $join_alias = 't', ?string $lang = null, string $join_type = 'LEFT JOIN') : string
* Create a join into the translate table, with a preference to language-matched translations but fall-back.
*
* @param ID_TEXT $field Field name of what we are joining against
* @param string $join_alias Join alias
* @param ?LANGUAGE_NAME $lang Language (null: current language)
* @param string $join_type Join type
* @return string Join SQL
*/
public function translate_field_join(string $field, string $join_alias = 't', ?string $lang = null, string $join_type = 'LEFT JOIN') : string