ModulesFiles::moduleFileExt() method

Get or set module file extension type (1 or 2)

Usage

// basic usage
$int = $modulesFiles->moduleFileExt(string $class);

// usage with all arguments
$int = $modulesFiles->moduleFileExt(string $class, int $setValue = null);

Arguments

NameType(s)Description
classstring

Module class name

setValue (optional)int

1 for '.module' or 2 for '.module.php', or omit to get current value

Return value

int


ModulesFiles methods and properties

API reference based on ProcessWire core version 3.0.244

“To Drupal, or to ProcessWire? The million dollar choice. We decided to make an early switch to PW. And in retrospect, ProcessWire was probably the best decision we made. Thanks are due to ProcessWire and the amazing system and set of modules that are in place.” —Unni Krishnan, Founder of PigtailPundits