3 +--------------------------------------------------------------------+
4 | Copyright CiviCRM LLC. All rights reserved. |
6 | This work is published under the GNU AGPLv3 license with some |
7 | permitted exceptions and without any warranty. For full license |
8 | and copyright information, see https://civicrm.org/licensing |
9 +--------------------------------------------------------------------+
13 * Angular base page for search admin
15 class CRM_Search_Page_Admin
extends CRM_Core_Page
{
20 private $allowedEntities = [];
22 public function run() {
24 'title' => ts('Search Kit'),
25 'url' => CRM_Utils_System
::url('civicrm/search'),
27 CRM_Utils_System
::appendBreadCrumb([$breadCrumb]);
29 $schema = \Civi\Search\Admin
::getSchema();
31 // If user does not have permission to search any entity, bye bye.
33 CRM_Utils_System
::permissionDenied();
36 // Add client-side vars for the search UI
39 'links' => \Civi\Search\Admin
::getLinks(array_column($schema, 'name')),
43 ->addBundle('bootstrap3')
44 ->addVars('search', $vars);
46 // Load angular module
47 $loader = new Civi\Angular\
AngularLoader();
48 $loader->setModules(['searchAdmin']);
49 $loader->setPageName('civicrm/search');
51 'defaultRoute' => '/create/Contact',