Setting Skill
⛔ CRITICAL RULES
MANDATORY: Validate with AskUserQuestion BEFORE writing to migration.
Mission
Add configuration settings to the sk_settings table.
Functions
php
// Single language setting
$this->addSetting(null, 'group', 'key', 'textValue', 0);
$this->addSetting('FR', 'group', 'key', 'textValue', 0);
// All languages at once
$this->addSkSettingsForAllLanguage('group', 'key',
['FR' => 'Texte FR', 'EN' => 'Text EN'],
['FR' => 0, 'EN' => 0]
);
Common Groups
| Group | Usage |
|---|---|
returnCode | Error messages |
labelFO | Front office translations |
labelBO | Back office translations |
formLabel | Form field labels |
| Custom | Feature-specific settings |
Process
- •Identify group and key
- •Determine value: Text and/or integer
- •Check if multilingual
- •Validate: Use AskUserQuestion
- •Write: Add to migration
Checklist
- • Group name is valid
- • Key is unique in group
- • Multilingual if needed
- • AskUserQuestion used before writing