Comment on page
$blueprint
BlueprintExtensionLibrary
We are moving Blueprint's documentation to a brand new website within the following weeks. This documentation website will phase out in the future.
BlueprintExtensionLibrary (or $blueprint) is added automatically when using the default controller by leaving your controller path option blank. For custom controllers, you may refer to this guide.
$blueprint (short for BlueprintExtensionLibrary) allows extensions to do operations like databasing inside of custom controllers (if imported), admin wrappers and dashboard wrappers.
The BlueprintExtensionLibrary is automatically imported to dashboard wrappers, admin wrappers and default admin controllers. It's mainly used to carry over configuration options from the extension's admin page to anywhere else but can also be used to read, make and wipe files or display notifications to administrators.
Supported on both dashboard and admin views.
dbGet(table, record)
Returns a database value. Will be fetched as "table::record".
dbSet(table, record, value)
Set a database value. Will be set as "table::record", "value".
Supported on admin views.
notify(text)
Allows you to show notifications on the admin panel. Appears on next reload.
notifyAfter(delay, text)
Allows you to show notifications on the admin panel after a delay. Admin page automatically reloads after specified delay.
notifyNow(text)
Allows you to show notifications on the admin panel after a delay. This behaves similarly to using a delay of zero with "notifyAfter()".
Supported on both dashboard and admin views.
fileRead(path)
Returns the contents of the file defined in "path".fileMake(path)
Make a new file with the name defined in "path".fileWipe(path)
Removes the file defined in "path" from the filesystem.Last modified 27d ago