Utils
in package
Uses
StringTranslationTrait
Session class contains helpers functions.
Table of Contents
Properties
- $database : Connection
- The database connection.
- $entityTypeManager : EntityTypeManagerInterface
- The entity type manager.
Methods
- __construct() : mixed
- Session helper Constructor.
- checkAccess() : mixed
- Check session access.
- getCountryName() : mixed
- Return country name from id.
- getEmptyIdFields() : mixed
- Return empty profile fields.
- getFormatCode() : mixed
- Return format code from id.
- getFormatDetails() : mixed
- Get format label and code.
- getFormatIdByCode() : mixed
- Return format id by code.
- getFormatLabel() : mixed
- Return format label from id.
- getImage() : mixed
- Return image url.
- getKeywordsLabels() : mixed
- Return keywords labels.
- getOrganisationType() : mixed
- Return Organisation type.
- getPoliticiansFunctions() : mixed
- Return list of politicians functions.
- getProgrammeNeededKeysNames() : mixed
- Return keys names for specific fields.
- getSideProgrammeNeededKeysNames() : mixed
- Return keys names for specific fields.
Properties
$database
The database connection.
protected
Connection
$database
$entityTypeManager
The entity type manager.
protected
EntityTypeManagerInterface
$entityTypeManager
Methods
__construct()
Session helper Constructor.
public
__construct(Connection $database, EntityTypeManagerInterface $entity_type_manager) : mixed
Parameters
- $database : Connection
-
Database connection instance.
- $entity_type_manager : EntityTypeManagerInterface
-
EntityTypeManager instance.
checkAccess()
Check session access.
public
checkAccess(mixed $session) : mixed
Parameters
- $session : mixed
getCountryName()
Return country name from id.
public
getCountryName(mixed $countryId) : mixed
Parameters
- $countryId : mixed
getEmptyIdFields()
Return empty profile fields.
public
getEmptyIdFields(mixed $profileData) : mixed
Parameters
- $profileData : mixed
getFormatCode()
Return format code from id.
public
getFormatCode(mixed $formatId) : mixed
Parameters
- $formatId : mixed
getFormatDetails()
Get format label and code.
public
getFormatDetails(mixed $formatId) : mixed
Parameters
- $formatId : mixed
getFormatIdByCode()
Return format id by code.
public
getFormatIdByCode(mixed $code) : mixed
Parameters
- $code : mixed
getFormatLabel()
Return format label from id.
public
getFormatLabel(mixed $formatId) : mixed
Parameters
- $formatId : mixed
getImage()
Return image url.
public
getImage(mixed $imageId, mixed $style) : mixed
Parameters
- $imageId : mixed
- $style : mixed
getKeywordsLabels()
Return keywords labels.
public
getKeywordsLabels(mixed $keywords) : mixed
Parameters
- $keywords : mixed
getOrganisationType()
Return Organisation type.
public
getOrganisationType(mixed $type) : mixed
Parameters
- $type : mixed
getPoliticiansFunctions()
Return list of politicians functions.
public
getPoliticiansFunctions() : mixed
getProgrammeNeededKeysNames()
Return keys names for specific fields.
public
getProgrammeNeededKeysNames() : mixed
getSideProgrammeNeededKeysNames()
Return keys names for specific fields.
public
getSideProgrammeNeededKeysNames() : mixed