\FAA\Obj\GenericCustomer

Summary

Methods
Properties
Constants
__construct()
Salutation()
SearchFields()
ListCompanies()
Name()
Types()
UnlinkCompany()
AddCompany()
Delete()
ToPlainObject()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$companies
N/A

Properties

$companies

$companies :array

List of related company ids

Type

array

Methods

__construct()

__construct(integer  $id = null,string  $language = null)

Customer constructor.

Construct a new customer object

Parameters

integer $id

A object id

string $language

The local language

Salutation()

Salutation(string  $language = null): string|object

Get salutation

Get the translated salutation from this content type. Can be raw as well.

Parameters

string $language

Translate to this language

Returns

string|object —

The option value

SearchFields()

SearchFields(): array

Return search indexer fields Convert instance to search indexer values

Returns

array —

The search indexer fields

ListCompanies()

ListCompanies(): array

List customers Get a list of related customer ids

Returns

array —

Get id list of related customers

Name()

Name(): mixed|string

Get the assigned company name

Returns

mixed|string

Types()

Types(): array<mixed,string>|null

Get the types list

Returns

array<mixed,string>|null

UnlinkCompany()

UnlinkCompany(  $company_id): \FAA\Obj\Result

Unlink from company

Parameters

$company_id

Returns

\FAA\Obj\Result

AddCompany()

AddCompany(integer  $company_id): \FAA\Obj\Result

Add a customer Add a new sub customer to this company.

Parameters

integer $company_id

A customer object id

Returns

\FAA\Obj\Result —

A system result object

Delete()

Delete(boolean  $skip = false): \FAA\Obj\Result

Delete customer Delete entity from file system and git repository This method will also delete the company link list

Parameters

boolean $skip

Skip hooks on demand

Returns

\FAA\Obj\Result —

A default system result set

ToPlainObject()

ToPlainObject(null  $language = null,boolean  $with_parent = true): \stdClass

Convert to plain object

Parameters

null $language
boolean $with_parent

Returns

\stdClass