Skip to content

Commit 3a95d85

Browse files
committed
more docs for module base2
1 parent cff8094 commit 3a95d85

File tree

2 files changed

+38
-2
lines changed

2 files changed

+38
-2
lines changed

content/dev/modules/base/_index.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,50 @@ There are also a number of helper methods to get some of the most common module
5959

6060
### getTitle
6161

62+
This gets the title for the Module.
63+
64+
It looks for defines with suffixes in an array of ['TITLE', 'TEXT_TITLE', 'CATALOG_TITLE']
65+
66+
If your module uses a different define for the title then you should override the getTitle method.
67+
6268
### getAdminTitle
6369

70+
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.
71+
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.
72+
73+
This function looks for defines with a suffix in an array ['TITLE_ADMIN', 'TEXT_TITLE_ADMIN', 'ADMIN_TITLE']
74+
75+
If your admin title is defined through other means, them you will need to override this method in your module.
76+
6477
### getDescription
6578

79+
returns a module define with the suffix `DESCRIPTION`
80+
6681
### getSortOrder
6782

83+
returns a module define with the suffix `SORT_ORDER`
84+
6885
### getZone
6986

87+
returns a module define with the suffix `ZONE`
88+
89+
### getDebugMode#
90+
91+
returns a module define with the suffix `DEBUG_MODE`
92+
93+
### isEnabled
94+
95+
This function checks to see if the module is enabled.
96+
97+
it first checks to see if the module has any missing configuraitions and then check the module define suffix `STATUS`
98+
99+
### moduleAutoloadSupportClasses
100+
101+
This function is only called if it exists.
102+
103+
It allows a module to add autoload classes using the psr4autoaload Aura autoload.
104+
105+
70106

71107

72108

content/dev/modules/base/logging/_index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ It provides 3 log handlers
2121
- Console logging
2222
- Email Logging
2323

24-
To log an something in a module you can do
24+
To log something in a module you can do
2525

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

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

8383
## Console Logging
8484

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

8787
So will be viewable using your browsers developer console.
8888

0 commit comments

Comments
 (0)