European Week of Regions and Cities

Helper extends ControllerBase

Prepare and format data to be rendered in the template.

Table of Contents

Properties

$cmsConector  : CMSConnector
CMS rest API connector.
$configFactory  : ConfigFactoryInterface
Drupal config factory.
$connection  : Connection
Drupal database connection.
$fileSystem  : FileSystem
Drupal file system.
$httpClient  : Client
Guzzle\Client instance.
$loggerFactory  : LoggerChannelFactoryInterface
Logger channel factory interface instance.
$stateService  : StateInterface
The Drupal State API service.

Methods

__construct()  : mixed
CMSConnector constructor.
decodeLogErrors()  : mixed
Log errors decoding a JSON file.
fileSafeSave()  : mixed
Save file with checksum validation.
formatItem()  : mixed
Aplly webtools format to a single item.
getCmsPartners()  : mixed
Get partners data from CMS API.
getFileData()  : mixed
Get data from local file.
getOsmData()  : mixed
Get open street map data including latitude and longitude.
idExist()  : mixed
Check if map id exist in the given array.
proccessWebtoolsFeatures()  : mixed
Update webtools features if changes detected in the source.
processSingleAddress()  : mixed
Process single item from the queue.
queuePendingItems()  : mixed
Return number of pending items in the queue.
saveMapData()  : mixed
Save item into webtools json data file.

Properties

$configFactory

Drupal config factory.

protected ConfigFactoryInterface $configFactory

$connection

Drupal database connection.

protected Connection $connection

$fileSystem

Drupal file system.

protected FileSystem $fileSystem

$httpClient

Guzzle\Client instance.

protected Client $httpClient

$loggerFactory

Logger channel factory interface instance.

protected LoggerChannelFactoryInterface $loggerFactory

$stateService

The Drupal State API service.

protected StateInterface $stateService

Methods

__construct()

CMSConnector constructor.

public __construct(StateInterface $stateService, Client $http_client, LoggerChannelFactoryInterface $factory, ConfigFactoryInterface $config_factory, FileSystem $file_system, CMSConnector $cmsConector, Connection $connection) : mixed
Parameters
$stateService : StateInterface

Drupal State API service.

$http_client : Client

Guzzle\Client instance.

$factory : LoggerChannelFactoryInterface

A logger channel factory interface instance.

$config_factory : ConfigFactoryInterface

Drupal config factory.

$file_system : FileSystem

Drupal file system.

$cmsConector : CMSConnector

CMS rest API connector.

$connection : Connection

Drupal database connection.

decodeLogErrors()

Log errors decoding a JSON file.

public decodeLogErrors(mixed $uri, mixed $item_id) : mixed
Parameters
$uri : mixed
$item_id : mixed

fileSafeSave()

Save file with checksum validation.

public fileSafeSave(mixed $filename, mixed $data[, mixed $flags = 0 ][, mixed $context = NULL ]) : mixed
Parameters
$filename : mixed
$data : mixed
$flags : mixed = 0
$context : mixed = NULL

formatItem()

Aplly webtools format to a single item.

public formatItem(mixed $item) : mixed
Parameters
$item : mixed

getCmsPartners()

Get partners data from CMS API.

public getCmsPartners(mixed $year) : mixed
Parameters
$year : mixed

getFileData()

Get data from local file.

public getFileData(mixed $uri) : mixed
Parameters
$uri : mixed

getOsmData()

Get open street map data including latitude and longitude.

public getOsmData(array<string|int, mixed> $filter[, mixed $attempt = 1 ]) : mixed
Parameters
$filter : array<string|int, mixed>
$attempt : mixed = 1

idExist()

Check if map id exist in the given array.

public idExist(mixed $id, mixed $array) : mixed
Parameters
$id : mixed
$array : mixed

proccessWebtoolsFeatures()

Update webtools features if changes detected in the source.

public proccessWebtoolsFeatures(mixed $new_item, mixed $uri, mixed $queue_num_pending_items) : mixed
Parameters
$new_item : mixed
$uri : mixed
$queue_num_pending_items : mixed

processSingleAddress()

Process single item from the queue.

public processSingleAddress(mixed $item) : mixed
Parameters
$item : mixed

queuePendingItems()

Return number of pending items in the queue.

public queuePendingItems(mixed $queue_name) : mixed
Parameters
$queue_name : mixed

saveMapData()

Save item into webtools json data file.

public saveMapData(mixed $new_item, mixed $uri, mixed $queue_num_pending_items) : mixed
Parameters
$new_item : mixed
$uri : mixed
$queue_num_pending_items : mixed

        
On this page

Search results