[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/lib/db/ -> install.php (summary)

This file is executed right after the install.xml For more information, take a look to the documentation available: - Upgrade API: {@link http://docs.moodle.org/dev/Upgrade_API}

Copyright: 2009 Petr Skoda (http://skodak.org)
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 323 lines (15 kb)
Included or required: 5 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 function

  xmldb_main_install()

Functions
Functions that are not part of a class:

xmldb_main_install()   X-Ref
Main post-install tasks to be executed after the BD schema is available

This function is automatically executed after Moodle core DB has been
created at initial install. It's in charge of perform the initial tasks
not covered by the {@link install.xml} file, like create initial users,
roles, templates, moving stuff from other plugins...

Note that the function is only invoked once, at install time, so if new tasks
are needed in the future, they will need to be added both here (for new sites)
and in the corresponding {@link upgrade.php} file (for existing sites).

All plugins within Moodle (modules, blocks, reports...) support the existence of
their own install.php file, using the "Frankenstyle" component name as
defined at {@link http://docs.moodle.org/dev/Frankenstyle}, for example:
- {@link xmldb_page_install()}. (modules don't require the plugintype ("mod_") to be used.
- {@link xmldb_enrol_meta_install()}.
- {@link xmldb_workshopform_accumulative_install()}.
- ....

Finally, note that it's also supported to have one uninstall.php file that is
executed also once, each time one plugin is uninstalled (before the DB schema is
deleted). Those uninstall files will contain one function, using the "Frankenstyle"
naming conventions, like {@link xmldb_enrol_meta_uninstall()} or {@link xmldb_workshop_uninstall()}.



Generated: Thu Aug 11 10:00:09 2016 Cross-referenced by PHPXref 0.7.1