\MatthiasWeb\UtilsActivator

The activator class handles the plugin relevant activation hooks: Uninstall, activation, deactivation and installation. The "installation" means installing needed database tables.

Summary

Methods
Properties
Constants
dbDelta()
getMaxIndexLength()
install()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

dbDelta()

dbDelta(boolean  $errorlevel)

Install tables, stored procedures or whatever in the database.

This method is always called when the version bumps up or for the first initial activation.

Parameters

boolean $errorlevel

If true throw errors.

getMaxIndexLength()

getMaxIndexLength()

Indexes have a maximum size of 767 bytes. Historically, we haven't need to be concerned about that.

As of 4.2, however, we moved to utf8mb4, which uses 4 bytes per character. This means that an index which used to have room for floor(767/3) = 255 characters, now only has room for floor(767/4) = 191 characters.

install()

install(boolean  $errorlevel = false,callable  $installThisCallable = null)

Run an installation or dbDelta within a callable.

Parameters

boolean $errorlevel

Set true to throw errors.

callable $installThisCallable

Set a callable to install this one instead of the default.