yxorP Documentation

MoodleInstaller extends BaseInstaller
in package

Table of Contents

$composer  : mixed
$io  : mixed
$locations  : mixed
$package  : mixed
__construct()  : mixed
Initializes base installer.
getInstallPath()  : string
Return the install path based on package type.
getLocations()  : array<string, string>
Gets the installer's locations
inflectPackageVars()  : array<string, string>
For an installer to override to modify the vars per installer.
mapCustomInstallPaths()  : string|false
Search through a passed paths array for a custom install path.
templatePath()  : string
Replace vars in a path

Properties

$locations

protected mixed $locations = array('mod' => 'mod/{$name}/', 'admin_report' => 'admin/report/{$name}/', 'atto' => 'lib/editor/atto/plugins/{$name}/', 'tool' => 'admin/tool/{$name}/', 'assignment' => 'mod/assignment/type/{$name}/', 'assignsubmission' => 'mod/assign/submission/{$name}/', 'assignfeedback' => 'mod/assign/feedback/{$name}/', 'auth' => 'auth/{$name}/', 'availability' => 'availability/condition/{$name}/', 'block' => 'blocks/{$name}/', 'booktool' => 'mod/book/tool/{$name}/', 'cachestore' => 'cache/stores/{$name}/', 'cachelock' => 'cache/locks/{$name}/', 'calendartype' => 'calendar/type/{$name}/', 'fileconverter' => 'files/converter/{$name}/', 'format' => 'course/format/{$name}/', 'coursereport' => 'course/report/{$name}/', 'customcertelement' => 'mod/customcert/element/{$name}/', 'datafield' => 'mod/data/field/{$name}/', 'datapreset' => 'mod/data/preset/{$name}/', 'editor' => 'lib/editor/{$name}/', 'enrol' => 'enrol/{$name}/', 'filter' => 'filter/{$name}/', 'gradeexport' => 'grade/export/{$name}/', 'gradeimport' => 'grade/import/{$name}/', 'gradereport' => 'grade/report/{$name}/', 'gradingform' => 'grade/grading/form/{$name}/', 'local' => 'local/{$name}/', 'logstore' => 'admin/tool/log/store/{$name}/', 'ltisource' => 'mod/lti/source/{$name}/', 'ltiservice' => 'mod/lti/service/{$name}/', 'message' => 'message/output/{$name}/', 'mnetservice' => 'mnet/service/{$name}/', 'plagiarism' => 'plagiarism/{$name}/', 'portfolio' => 'portfolio/{$name}/', 'qbehaviour' => 'question/behaviour/{$name}/', 'qformat' => 'question/format/{$name}/', 'qtype' => 'question/type/{$name}/', 'quizaccess' => 'mod/quiz/accessrule/{$name}/', 'quiz' => 'mod/quiz/report/{$name}/', 'report' => 'report/{$name}/', 'repository' => 'repository/{$name}/', 'scormreport' => 'mod/scorm/report/{$name}/', 'search' => 'search/engine/{$name}/', 'theme' => 'theme/{$name}/', 'tinymce' => 'lib/editor/tinymce/plugins/{$name}/', 'profilefield' => 'user/profile/field/{$name}/', 'webservice' => 'webservice/{$name}/', 'workshopallocation' => 'mod/workshop/allocation/{$name}/', 'workshopeval' => 'mod/workshop/eval/{$name}/', 'workshopform' => 'mod/workshop/form/{$name}/')

Methods

__construct()

Initializes base installer.

public __construct([PackageInterface $package = null ][, Composer $composer = null ][, IOInterface $io = null ]) : mixed
Parameters
$package : PackageInterface = null
$composer : Composer = null
$io : IOInterface = null
Return values
mixed

getInstallPath()

Return the install path based on package type.

public getInstallPath(PackageInterface $package[, string $frameworkType = '' ]) : string
Parameters
$package : PackageInterface
$frameworkType : string = ''
Return values
string

getLocations()

Gets the installer's locations

public getLocations() : array<string, string>
Return values
array<string, string>

map of package types => install path

inflectPackageVars()

For an installer to override to modify the vars per installer.

public inflectPackageVars(array<string, string> $vars) : array<string, string>
Parameters
$vars : array<string, string>

This will normally receive array{name: string, vendor: string, type: string}

Return values
array<string, string>

mapCustomInstallPaths()

Search through a passed paths array for a custom install path.

protected mapCustomInstallPaths(array<string|int, mixed> $paths, string $name, string $type[, string $vendor = NULL ]) : string|false
Parameters
$paths : array<string|int, mixed>
$name : string
$type : string
$vendor : string = NULL

= NULL

Return values
string|false

templatePath()

Replace vars in a path

protected templatePath(string $path[, array<string, string> $vars = array() ]) : string
Parameters
$path : string
$vars : array<string, string> = array()
Return values
string

Search results