Developer / API
Console commands
Plugin::init() registers three flat console controller IDs directly on the app's
controllerMap — there is no generator or import sub-segment, so commands are
seeder/<action>, seeder-cron/<action>, and seeder-import/<action>.
The plugin's own README.md and COMMANDS.md (and a docblock on CronController) describe
commands shaped like seeder/generator/customers and seeder/cron/run. Those do not resolve —
Yii console action IDs cannot contain a slash, and the controller is registered under the flat
key seeder (and seeder-cron), not a nested seeder/generator module. Use the commands below,
which match the actual controllerMap registration in Plugin.php.
Generator (GeneratorController, registered as seeder)
| Command | Purpose |
|---|---|
seeder/wizard | Interactive guided flow to pick generator, dataset, and product type. Supports --yes, --non-interactive, --profile=<handle>. |
seeder/customers <count> | Generate customers. |
seeder/products <count> [--category=<handle>] | Generate products, optionally from one category dataset. |
seeder/orders <count> [--order-scenario=standard|holiday-sale|subscription-renewals] | Generate orders from existing customers/products. |
seeder/coupons <count> | Generate coupons. |
seeder/gift-cards <count> | Generate gift cards and gift card accounts. |
seeder/catalog-rules <count> | Generate catalog price rules. |
seeder/payment-methods <count> | Seed payment methods from data/payments/methods.json. |
seeder/shipping-fees <count> | Seed shipping fees from data/shipping/fees.json. |
seeder/shipping-zones <count> | Seed shipping zones from data/shipping/zones.json. |
seeder/shipping-table-rates <count> | Seed shipping table rates from data/shipping/table-rates.json. |
seeder/shipping-methods <count> | Seed shipping methods from data/shipping/methods.json. |
seeder/generate | Legacy interactive product/category generation flow. |
seeder/status | Counts of seeded products, customers, orders, profiles, and enabled currencies. |
seeder/reset [<profile-handle>] | Purges configured data and regenerates it from the active or specified profile. Destructive when the profile's purge options are enabled. |
seeder/download-templates [--overwrite] [--dry-run] [--template-registry=<url>] | Downloads template dataset packs into the plugin's data/ directory. |
Shared options where relevant: --yes (skip confirmations), --non-interactive,
--profile=<handle>, --validate, --dry-run, --locale=<locale>, --seed=<n>,
--batch-size=<n>, --concurrency=<n>.
See Console Commands for the full per-command option/argument reference, exit codes, and examples.
Cron (CronController, registered as seeder-cron)
| Command | Purpose |
|---|---|
seeder-cron/run [<profile-handle>] | Runs all enabled profiles with a cron schedule, or one specific profile by handle. |
seeder-cron/list | Lists profiles with their cron schedules and last-run status. |
Import (ImportController, registered as seeder-import)
| Command | Purpose |
|---|---|
seeder-import/run --profile=<handle> [--file=<path>] [--queue] | Runs a saved import profile. --file overrides the profile's source file (absolute, or relative to @storage/seeder-imports). --queue dispatches a yui\seeder\jobs\ImportJob instead of running inline. |
seeder-import/list | Lists saved import profiles. |
CP routes
Registered on UrlManager::EVENT_REGISTER_CP_URL_RULES in Plugin.php:
| Route | Purpose |
|---|---|
seeder, seeder/profiles | Generator profile list |
seeder/profiles/new, seeder/profiles/<id> | Generator profile create/edit |
seeder/profiles/generate, seeder/profiles/bulk-generate, seeder/profiles/dry-run | Run a profile (or several), or preview without writing |
seeder/profiles/duplicate, seeder/profiles/set-status, seeder/profiles/delete | Profile management |
seeder/run-log/<id> | Generator run log detail |
seeder/import, seeder/import/new, seeder/import/<id> | Import profile list/create/edit (the wizard) |
seeder/import/upload, seeder/import/preview-columns, seeder/import/detect-paths | Import wizard source/mapping steps (AJAX) |
seeder/import/sections, seeder/import/entry-fields, seeder/import/relation-sub-fields | Import wizard target-field discovery for entries (AJAX) |
seeder/import/run, seeder/import/save, seeder/import/delete | Import profile actions |
seeder/import-logs, seeder/import-logs/<id> | Import log list/detail |
seeder/import-logs/delete, seeder/import-logs/delete-all | Import log cleanup |
seeder/settings | Plugin settings |
seeder/license/* | License activation/redeem/revoke panel, shared with the rest of the ecosystem |
Services
Registered as components on the Plugin instance (Plugin::getInstance()->get('<name>')):
| Component | Class | Key methods |
|---|---|---|
profiles | ProfileService | getAllProfiles(), getEnabledProfiles(), getProfileById(), getProfileByHandle(), saveProfile(SeederProfile $profile, bool $runValidation = true), deleteProfileById(), duplicateProfile() |
profileConfig | ProfileConfigService | Builds/normalizes the per-entity generator config stored on a SeederProfile. |
runLog | RunLogService | Persists and queries SeederRunLog records for generator runs. |
dataService | SeederDataService | Reads the bundled JSON datasets under data/ (brands, categories, customers, payments, shipping). |
storeResolver | StoreResolver | Resolves the yStore plugin's customer/product/order services and models across yStore versions. |
importProfiles | ImportProfileService | getAllProfiles(), getProfileById(), getProfileByHandle(), saveProfile(ImportProfile $profile), deleteProfile() |
importSource | SourceService | getParser($format), fetchRows($profile), saveUpload(), detectColumns(), previewRows(), detectDataPaths() — dispatches to the CSV/JSON/XML ParserInterface implementation for the profile's fileFormat. |
importer | ImportService | run(ImportProfile $profile, string $trigger = ImportLog::TRIGGER_CP, ?string $overrideFilePath = null, ?callable $progressCallback = null): ImportLog — runs a full import and returns the finished log. |
importLog | ImportLogService | Starts/updates ImportLog/ImportLogItem records for both CP and CLI-triggered imports. |
license | LicenseService | License activation/validation, shared with the rest of the yStore ecosystem. |
ImportProfile::$elementType is one of product, entry, category, customer;
$sourceType is file or url; $fileFormat is csv, json, or xml. Import row parsing
goes through yui\seeder\importers\parsers\{Csv,Json,Xml}Parser, all implementing
ParserInterface::parse()/detectColumns()/preview().
Extending
- New generator entity type — add a trait under
src/traits/(seeProductSeederTrait,CustomerSeederTrait,OrderSeederTrait,CouponSeederTrait,GiftCardSeederTrait,CatalogRuleSeederTrait,WishlistSeederTraitfor the pattern), wire it intoGeneratorControllerand the profile config schema inProfileConfigService. - New import source format — implement
ParserInterfaceand register it inSourceService::getParser(). - New import target field type — extend
ProductMapper(or add a sibling mapper for entries/categories/customers) and the target-field discovery routes used by the import wizard's Mapping step.