$modulesfindByFlag()

Find modules by matching flag

This is significantly faster than using findByInfo()

Available since version 3.0.259.

Usage

// basic usage
$array = $modules->findByFlag(int $flag);

// usage with all arguments
$array = $modules->findByFlag(int $flag, $load = false);

Arguments

NameType(s)Description
$flagint

Flag to match

$load (optional)bool int

Specify one of the following or omit for false:

  • Boolean true to return array of instantiated modules.
  • Boolean false to return array of module names (default).
  • Integer 1 to return array of module info for each matching module.
  • Integer 2 to return array of verbose module info for each matching module.

Return value

array

Array of modules, module names or module info arrays, indexed by module name.


$modules methods and properties

API reference based on ProcessWire core version 3.0.261