Skip to content

Commit

Permalink
more docs for module base2
Browse files Browse the repository at this point in the history
  • Loading branch information
zcwilt committed Jul 29, 2024
1 parent cff8094 commit 3a95d85
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 2 deletions.
36 changes: 36 additions & 0 deletions content/dev/modules/base/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,50 @@ There are also a number of helper methods to get some of the most common module

### getTitle

This gets the title for the Module.

It looks for defines with suffixes in an array of ['TITLE', 'TEXT_TITLE', 'CATALOG_TITLE']

If your module uses a different define for the title then you should override the getTitle method.

### getAdminTitle

This returns a title to display on the Admin interface. In general this would be the same as the getTitle as above, but sometimes you may want it to be different.
It expects to be passed a default title, which would normally be what the getTitle function returns, ans will use this if it does not find a define related to the admin title.

This function looks for defines with a suffix in an array ['TITLE_ADMIN', 'TEXT_TITLE_ADMIN', 'ADMIN_TITLE']

If your admin title is defined through other means, them you will need to override this method in your module.

### getDescription

returns a module define with the suffix `DESCRIPTION`

### getSortOrder

returns a module define with the suffix `SORT_ORDER`

### getZone

returns a module define with the suffix `ZONE`

### getDebugMode#

returns a module define with the suffix `DEBUG_MODE`

### isEnabled

This function checks to see if the module is enabled.

it first checks to see if the module has any missing configuraitions and then check the module define suffix `STATUS`

### moduleAutoloadSupportClasses

This function is only called if it exists.

It allows a module to add autoload classes using the psr4autoaload Aura autoload.





Expand Down
4 changes: 2 additions & 2 deletions content/dev/modules/base/logging/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ It provides 3 log handlers
- Console logging
- Email Logging

To log an something in a module you can do
To log something in a module you can do

`$this->logger->log($logLevel, $message, $context)`

Expand Down Expand Up @@ -82,7 +82,7 @@ Then if a customer id is available in the context of the log then the customer i

## Console Logging

This will log the error message and context(if passed) to the javasript console.
This will log the error message and context(if passed) to the javascript console.

So will be viewable using your browsers developer console.

Expand Down

0 comments on commit 3a95d85

Please sign in to comment.