setTheme(string $theme)

The setTheme is used in order to change the default theme (bootstrap). Have in mind that a theme is the full HTML,JS and CSS so it is not only re-skinning. The syntax is simple:


This is one of the few functions that are used differently in community edition from Grocery CRUD Enterprise.

More specifically in community edition we can use the setTheme for the existing themes that we have, more specifically:

$crud->setSubject('Customer', 'Customers');

However, for Grocery CRUD Enterprise edition this is a more advanced technique when you would like to create a custom new theme. For this reason we combine the setTheme with setThemePath and this is only for advanced users.

If you are using Grocery CRUD Enterprise, and you would like to change the theme you should use the setSkin function instead.