\Patami\IPS\Services\Alexa\SkillsIOModuleTrait

Provides common methods for Amazon Alexa Smart Home and Custom Skill I/O modules.

Eliminates the need for a common base class, since both WebHook and WebOAuth I/Os are being used.

Summary

Methods
Properties
Constants
GetLocale()
No public properties found
No constants found
SkillCreate()
GetSkillConfigurationFormData()
GetLocaleLabel()
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

GetLocale()

GetLocale() : string

Returns the configured default locale.

Returns

string —

Locale code of the default locale.

SkillCreate()

SkillCreate() 

Registers configuration properties for Alexa Skill I/O modules.

Called by IOModuleTrait::CustomSkillCreate(). Calls the regular Create() method of the WebHook or WebOAuth parent class.

GetSkillConfigurationFormData()

GetSkillConfigurationFormData() : array

Adds the default locale configuration field to Alexa Skill I/O modules.

Called by IOModuleTrait::GetCustomSkillConfigurationFormData(). Calls the regular GetConfigurationFormData() method of the WebHook or WebOAuth parent class.

Returns

array —

IPS module configuration form data.

GetLocaleLabel()

GetLocaleLabel() : string

Returns the label of the default locale configuration field.

This needs to be overridden by the concrete child class to customize the label.

Returns

string —

Translated label of the configuration field.