From 56322e09cc9a52b1b4c1a916ca024aafd5703b89 Mon Sep 17 00:00:00 2001 From: Seamus Lee <seamuslee001@gmail.com> Date: Sat, 22 Jun 2019 19:29:33 +1000 Subject: [PATCH] Update examples to be simpler initially and a more detailed example --- docs/hooks/hook_civicrm_themes.md | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/docs/hooks/hook_civicrm_themes.md b/docs/hooks/hook_civicrm_themes.md index ee8f6378..403aa5b3 100644 --- a/docs/hooks/hook_civicrm_themes.md +++ b/docs/hooks/hook_civicrm_themes.md @@ -46,19 +46,32 @@ This Hook is called when building a list of available themes for use within Civi /* * A theme is a set of CSS files which are loaded on CiviCRM pages. */ + function civitest_civicrm_themes( &$themes ) { + $themes['civielection'] = [ + 'title' => 'civielection theme', + 'ext' => 'au.org.greens.civielection', + ]; + } +``` +a more detailed example + +```php + /* + * A theme is a set of CSS files which are loaded on CiviCRM pages. + */ function civitest_civicrm_themes( &$themes ) { $themes['civielection'] = [ - 'name' => 'civielection', 'title' => 'civielection theme', 'ext' => 'au.org.greens.civielection', - 'prefix' => NULL, + 'name' => 'civielection', 'url_callback' => '\\Civi\\Core\\Themes\\Resolvers::simple', 'search_order' => [ 0 => 'civielection', - 1 => '_fallback_', + 1 => Civi\Core\Themes::FALLBACK, ], - 'excludes' => [], + 'prefix' => 'election', + 'excludes' => ['bootstrap.css'], ]; } ``` -- GitLab