System\Helpers\System

System Helper

See also:

Protected properties

protected bool $hasDatabaseCache

hasDatabaseCache helps multiple calls to hasDatabase()

Public methods

public void checkBaseDir($filePath)

checkBaseDir checks if a file path is inside the base directory

Parameters
  • $filePath

public void checkDebugMode()

checkDebugMode returns true if debug mode is on

public void checkSafeMode()

checkSafeMode will return true if cms.safe_mode config is enabled

public void composerToOctoberCode($name)

composerToOctoberCode converts a composer code to an October CMS code rainlab/mailchimp-plugin-9999999-dev -> rainlab.mailchimp

Parameters
  • $name

public void hasDatabase()

hasDatabase checks if a database connection can be made and the migrations table exists

public void hasModule($name)

hasModule checks for a module inside the system

Parameters
  • $name

public void listModules()

listModules returns a list of module names that are enabled

public void octoberToComposerCode($name, $type, $prefix=false)

octoberToComposerCode converts an October CMS code to a composer code RainLab.Mailchimp -> rainlab/mailchimp-plugin

Parameters
  • $name
  • $type
  • $prefix