Joomla CMS  4.2.2
Documentation des API du CMS Joomla en version 4.2.2
Référence de la classe CaptiveModel
+ Graphe d'héritage de CaptiveModel:

Fonctions membres publiques

 suppressAllModules (CMSApplication $app=null)
 
 getRecords (User $user=null, bool $includeBackupCodes=false)
 
 loadCaptiveRenderOptions (?MfaTable $record)
 
 getPageTitle ()
 
 translateMethodName (string $name)
 
 getMethodImage (string $name)
 
 onAfterModuleList (Event $event)
 
- Fonctions membres publiques hérités de BaseDatabaseModel
 __construct ($config=array(), MVCFactoryInterface $factory=null)
 
 getTable ($name='', $prefix='', $options=array())
 
 isCheckedOut ($item)
 
 getDbo ()
 
 setDbo (DatabaseInterface $db=null)
 
 __get ($name)
 
- Fonctions membres publiques hérités de BaseModel
 __construct ($config=array())
 
 getName ()
 
- Fonctions membres publiques hérités de CMSObject
 __construct ($properties=null)
 
 __toString ()
 
 def ($property, $default=null)
 
 get ($property, $default=null)
 
 getProperties ($public=true)
 
 getError ($i=null, $toString=true)
 
 getErrors ()
 
 set ($property, $value=null)
 
 setProperties ($properties)
 
 setError ($error)
 
- Fonctions membres publiques hérités de StatefulModelInterface
 getState ($property=null, $default=null)
 
 setState ($property, $value=null)
 
- Fonctions membres publiques hérités de DispatcherAwareInterface
 setDispatcher (DispatcherInterface $dispatcher)
 
- Fonctions membres publiques hérités de CurrentUserInterface
 setCurrentUser (User $currentUser)
 
- Fonctions membres publiques hérités de CacheControllerFactoryAwareInterface
 setCacheControllerFactory (CacheControllerFactoryInterface $factory)
 
- Fonctions membres publiques hérités de DatabaseAwareInterface
 setDatabase (DatabaseInterface $db)
 

Attributs protégés

 $activeMFAMethodNames = null
 
- Attributs protégés hérités de BaseDatabaseModel
 $option = null
 
 $event_clean_cache = null
 
- Attributs protégés hérités de BaseModel
 $name
 
- Attributs protégés hérités de CMSObject
 $_errors = array()
 

Fonctions membres privées

 getActiveMethodNames ()
 
 filterModules (array &$modules)
 
 getAllowedModulePositions ()
 

Membres hérités additionnels

- Fonctions membres publiques statiques hérités de BaseModel
static addIncludePath ($path='', $prefix='')
 
- Fonctions membres protégées hérités de BaseDatabaseModel
 _getList ($query, $limitstart=0, $limit=0)
 
 _getListCount ($query)
 
 _createTable ($name, $prefix='Table', $config=array())
 
 bootComponent ($component)
 
 dispatchEvent (EventInterface $event)
 
- Attributs protégés statiques hérités de BaseModel
static $paths
 

Description détaillée

Captive Multi-factor Authentication page's model

Depuis
4.2.0

Documentation des fonctions membres

◆ filterModules()

filterModules ( array &  $modules)
private

This is the Method which actually filters the sites modules based on the allowed module positions specified by the user.

Paramètres
array$modulesThe list of the site's modules. Passed by reference.
Renvoie
void The by-reference value is modified instead.
Depuis
4.2.0
Exceptions
Exception

Références $module, et $modules.

◆ getActiveMethodNames()

getActiveMethodNames ( )
private

Return all the active MFA Methods' names

Renvoie
array
Depuis
4.2.0

◆ getAllowedModulePositions()

getAllowedModulePositions ( )
private

Get a list of module positions we are allowed to display

Renvoie
array
Exceptions
Exception
Depuis
4.2.0

Références Factory\getApplication(), et ComponentHelper\getParams().

◆ getMethodImage()

getMethodImage ( string  $name)

Translate a MFA Method's name into the relative URL if its logo image

Paramètres
string$nameThe internal MFA Method name
Renvoie
string
Depuis
4.2.0

Références $name, et null.

◆ getPageTitle()

getPageTitle ( )

Returns the title to display in the Captive login page, or an empty string if no title is to be displayed.

Renvoie
string
Depuis
4.2.0

Références Text\_(), et ComponentHelper\getParams().

◆ getRecords()

getRecords ( User  $user = null,
bool  $includeBackupCodes = false 
)

Get the MFA records for the user which correspond to active plugins

Paramètres
User | null$userThe user for which to fetch records. Skip to use the current user.
bool$includeBackupCodesShould I include the backup codes record?
Renvoie
array
Exceptions
Exception
Depuis
4.2.0

Références $method, $user, class, Factory\getApplication(), et Factory\getContainer().

◆ loadCaptiveRenderOptions()

loadCaptiveRenderOptions ( ?MfaTable  $record)

Load the Captive login page render options for a specific MFA record

Paramètres
MfaTable$recordThe MFA record to process
Renvoie
CaptiveRenderOptions The rendering options
Depuis
4.2.0

Références $result, $results, Text\_(), et Factory\getApplication().

◆ onAfterModuleList()

onAfterModuleList ( Event  $event)

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ètres
Event$eventThe Joomla! event object
Renvoie
void
Exceptions
Exception
Depuis
4.2.0

Références $modules, AbstractEvent\getArgument(), et Event\setArgument().

◆ suppressAllModules()

suppressAllModules ( CMSApplication  $app = null)

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ètres
CMSApplication | null$appThe CMS application to manipulate
Renvoie
void
Exceptions
Exception
Depuis
4.2.0

Références $app, $this, et Factory\getApplication().

◆ translateMethodName()

translateMethodName ( string  $name)

Translate a MFA Method's name into its human-readable, display name

Paramètres
string$nameThe internal MFA Method name
Renvoie
string
Depuis
4.2.0

Références $name, Text\_(), et null.

Documentation des champs

◆ $activeMFAMethodNames

$activeMFAMethodNames = null
protected

La documentation de cette classe a été générée à partir du fichier suivant :