[ Index ] |
PHP Cross Reference of Joomla 4.2.2 documentation |
[Source view] [Print] [Project Stats]
(no description)
Copyright: | (C) 2022 Open Source Matters, Inc. |
License: | GNU General Public License version 2 or later; see LICENSE.txt |
File Size: | 415 lines (12 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
CaptiveModel:: (11 methods):
suppressAllModules()
getRecords()
getActiveMethodNames()
getRecord()
loadCaptiveRenderOptions()
getPageTitle()
translateMethodName()
getMethodImage()
onAfterModuleList()
filterModules()
getAllowedModulePositions()
Class: CaptiveModel - X-Ref
Captive Multi-factor Authentication page's modelsuppressAllModules(CMSApplication $app = null) X-Ref |
Prevents Joomla from displaying any modules. This is implemented with a trick. If you use jdoc tags to load modules the JDocumentRendererHtmlModules uses JModuleHelper::getModules() to load the list of modules to render. This goes through JModuleHelper::load() which triggers the onAfterModuleList event after cleaning up the module list from duplicates. By resetting the list to an empty array we force Joomla to not display any modules. Similar code paths are followed by any canonical code which tries to load modules. So even if your template does not use jdoc tags this code will still work as expected. param: CMSApplication|null $app The CMS application to manipulate return: void |
getRecords(User $user = null, bool $includeBackupCodes = false) X-Ref |
Get the MFA records for the user which correspond to active plugins param: User|null $user The user for which to fetch records. Skip to use the current user. param: bool $includeBackupCodes Should I include the backup codes record? return: array |
getActiveMethodNames() X-Ref |
No description |
getRecord(?User $user = null) X-Ref |
Get the currently selected MFA record for the current user. If the record ID is empty, it does not correspond to the currently logged in user or does not correspond to an active plugin null is returned instead. param: User|null $user The user for which to fetch records. Skip to use the current user. return: MfaTable|null |
loadCaptiveRenderOptions(?MfaTable $record) X-Ref |
Load the Captive login page render options for a specific MFA record param: MfaTable $record The MFA record to process return: CaptiveRenderOptions The rendering options |
getPageTitle() X-Ref |
Returns the title to display in the Captive login page, or an empty string if no title is to be displayed. return: string |
translateMethodName(string $name) X-Ref |
Translate a MFA Method's name into its human-readable, display name param: string $name The internal MFA Method name return: string |
getMethodImage(string $name) X-Ref |
Translate a MFA Method's name into the relative URL if its logo image param: string $name The internal MFA Method name return: string |
onAfterModuleList(Event $event) X-Ref |
Process the modules list on Joomla! 4. Joomla! 4.x is passing an Event object. The first argument of the event object is the array of modules. After filtering it we have to overwrite the event argument (NOT just return the new list of modules). If a future version of Joomla! uses immutable events we'll have to use Reflection to do that or Joomla! would have to fix the way this event is handled, taking its return into account. For now, we just abuse the mutable event properties - a feature of the event objects we discussed in the Joomla! 4 Working Group back in August 2015. param: Event $event The Joomla! event object return: void |
filterModules(array &$modules) X-Ref |
This is the Method which actually filters the sites modules based on the allowed module positions specified by the user. param: array $modules The list of the site's modules. Passed by reference. return: void The by-reference value is modified instead. |
getAllowedModulePositions() X-Ref |
Get a list of module positions we are allowed to display return: array |
Generated: Wed Sep 7 05:41:13 2022 | Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer |