Documentation

Gus extends Base
in package

Gus record collector class.

Table of Contents

$allowedModules  : array<string|int, string>
$description  : string
$displayType  : string
$docUrl  : string
$formFieldsToRecordMap  : mixed
{@inheritdoc}
$icon  : string
$label  : string
$moduleName  : string
$settingsFields  : array<string|int, mixed>
$addOnName  : string
$data  : array<string|int, mixed>
$fields  : mixed
var array List of fields for the modal search window.
$modulesFieldsMap  : array<string|int, mixed>
$name  : string
$paid  : bool
$request  : Request
$response  : array<string|int, mixed>
__construct()  : mixed
Constructor.
getClientParams()  : array<string|int, string>
Get params.
getFields()  : array<string|int, Vtiger_Field_Model>
Get fields for the modal search window.
getFieldsLabelsByModule()  : array<string|int, string>
Get fields labels for the module name.
getFieldsModule()  : array<string|int, string>
Get fields for the module name.
getName()  : string
Get record collector name.
isActive()  : bool
Check whether it is active.
isAvailable()  : bool
Check if product is available.
loadData()  : void
Load data.
search()  : array<string|int, mixed>
Search data function.
setRequest()  : void
Set request.
getParams()  : array<string|int, mixed>
Get params of collector.

Properties

$allowedModules

public array<string|int, string> $allowedModules = ['Accounts', 'Leads', 'Vendors', 'Competition', 'Partners']

Allowed modules.

$description

public string $description = 'LBL_PL_GUS_DESC'

Additional description, visible in the modal window.

$displayType

public string $displayType = 'FillFields'

Search results display type.

$docUrl

public string $docUrl = 'https://api.stat.gov.pl/Home/RegonApi'

Url to Documentation API

$formFieldsToRecordMap

{@inheritdoc}

public mixed $formFieldsToRecordMap = ['Accounts' => ['Nazwa' => 'accountname', 'Regon' => 'registration_number_2', 'Krs' => 'registration_number_1', 'Nip' => 'vat_id', 'NumerBudynku' => 'buildingnumbera', 'NumerLokalu' => 'localnumbera', 'Ulica' => 'addresslevel8a', 'KodPocztowy' => 'addresslevel7a', 'Miejscowosc' => 'addresslevel5a', 'Gmina' => 'addresslevel4a', 'Powiat' => 'addresslevel3a', 'Wojewodztwo' => 'addresslevel2a', 'Kraj' => 'addresslevel1a', 'NumerTelefonu' => 'phone', 'NumerFaksu' => 'fax', 'AdresEmail' => 'email1', 'AdresStronyInternetowej' => 'website'], 'Leads' => ['Nazwa' => 'company', 'Nip' => 'vat_id', 'Regon' => 'registration_number_2', 'NumerBudynku' => 'buildingnumbera', 'NumerLokalu' => 'localnumbera', 'Ulica' => 'addresslevel8a', 'KodPocztowy' => 'addresslevel7a', 'Miejscowosc' => 'addresslevel5a', 'Gmina' => 'addresslevel4a', 'Powiat' => 'addresslevel3a', 'Wojewodztwo' => 'addresslevel2a', 'Kraj' => 'addresslevel1a', 'NumerBudynku' => 'buildingnumbera', 'NumerTelefonu' => 'phone', 'NumerFaksu' => 'fax', 'AdresEmail' => 'email', 'AdresStronyInternetowej' => 'website'], 'Partners' => ['Nazwa' => 'subject', 'Nip' => 'vat_id', 'NumerBudynku' => 'buildingnumbera', 'NumerLokalu' => 'localnumbera', 'Ulica' => 'addresslevel8a', 'KodPocztowy' => 'addresslevel7a', 'Miejscowosc' => 'addresslevel5a', 'Gmina' => 'addresslevel4a', 'Powiat' => 'addresslevel3a', 'Wojewodztwo' => 'addresslevel2a', 'Kraj' => 'addresslevel1a'], 'Vendors' => ['Nazwa' => 'vendorname', 'Nip' => 'vat_id', 'Regon' => 'registration_number_2', 'NumerBudynku' => 'buildingnumbera', 'NumerLokalu' => 'localnumbera', 'Ulica' => 'addresslevel8a', 'KodPocztowy' => 'addresslevel7a', 'Miejscowosc' => 'addresslevel5a', 'Gmina' => 'addresslevel4a', 'Powiat' => 'addresslevel3a', 'Wojewodztwo' => 'addresslevel2a', 'Kraj' => 'addresslevel1a'], 'Competition' => ['Nazwa' => 'subject', 'Nip' => 'vat_id', 'NumerBudynku' => 'buildingnumbera', 'NumerLokalu' => 'localnumbera', 'Ulica' => 'addresslevel8a', 'KodPocztowy' => 'addresslevel7a', 'Miejscowosc' => 'addresslevel5a', 'Gmina' => 'addresslevel4a', 'Powiat' => 'addresslevel3a', 'Wojewodztwo' => 'addresslevel2a', 'Kraj' => 'addresslevel1a']]

$icon

public string $icon = 'yfi-gus-regon-pl'

Icon.

$label

public string $label = 'LBL_PL_GUS'

Label.

$moduleName

public string $moduleName

Module name.

$settingsFields

public array<string|int, mixed> $settingsFields = []

Configuration field list.

$addOnName

protected string $addOnName = 'YetiForcePlGus'

The name of Add-on.

$data

protected array<string|int, mixed> $data = []

Data from record collector source.

$fields

var array List of fields for the modal search window.

protected mixed $fields = ['vatId' => ['labelModule' => '_Base', 'label' => 'Vat ID'], 'ncr' => ['labelModule' => '_Base', 'label' => 'Registration number 1'], 'taxNumber' => ['labelModule' => '_Base', 'label' => 'Registration number 2']]

$modulesFieldsMap

protected array<string|int, mixed> $modulesFieldsMap = ['Accounts' => ['vatId' => 'vat_id', 'taxNumber' => 'registration_number_2', 'ncr' => 'registration_number_1'], 'Leads' => ['vatId' => 'vat_id', 'taxNumber' => 'registration_number_2', 'ncr' => 'registration_number_1'], 'Vendors' => ['vatId' => 'vat_id', 'taxNumber' => 'registration_number_2', 'ncr' => 'registration_number_1'], 'Competition' => ['vatId' => 'vat_id', 'taxNumber' => 'registration_number_2', 'ncr' => 'registration_number_1'], 'Partners' => ['vatId' => 'vat_id']]

Fields mapping for loading record data.

$name

protected string $name

Record collector name.

$paid

protected bool $paid = true

Requires subscription.

$response

protected array<string|int, mixed> $response = []

Response data.

Methods

__construct()

Constructor.

public __construct() : mixed
Return values
mixed

getClientParams()

Get params.

public getClientParams(string $moduleName) : array<string|int, string>
Parameters
$moduleName : string
Return values
array<string|int, string>

getFields()

Get fields for the modal search window.

public getFields() : array<string|int, Vtiger_Field_Model>
Return values
array<string|int, Vtiger_Field_Model>

getFieldsLabelsByModule()

Get fields labels for the module name.

public getFieldsLabelsByModule(string $moduleName) : array<string|int, string>
Parameters
$moduleName : string
Return values
array<string|int, string>

getFieldsModule()

Get fields for the module name.

public getFieldsModule(string $moduleName) : array<string|int, string>
Parameters
$moduleName : string
Return values
array<string|int, string>

getName()

Get record collector name.

public getName() : string
Return values
string

isActive()

Check whether it is active.

public isActive() : bool
Return values
bool

isAvailable()

Check if product is available.

public isAvailable() : bool
Return values
bool

loadData()

Load data.

public loadData() : void
Return values
void

Search data function.

public search() : array<string|int, mixed>
Return values
array<string|int, mixed>

setRequest()

Set request.

public setRequest(Request $request) : void
Parameters
$request : Request
Return values
void

getParams()

Get params of collector.

protected getParams() : array<string|int, mixed>
Return values
array<string|int, mixed>

        

Search results