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 +--------------------------------------------------------------------+
12 namespace Civi\Search
;
16 * @package Civi\Search
23 public static function getPartials($moduleName, $module) {
25 foreach (self
::getDisplayTypes(['id', 'name']) as $type) {
26 $partials["~/$moduleName/displayType/{$type['id']}.html"] =
27 '<' . $type['name'] . ' api-entity="{{:: $ctrl.apiEntity }}" search="$ctrl.searchName" display="$ctrl.display.name" settings="$ctrl.display.settings" filters="$ctrl.filters"></' . $type['name'] . '>';
35 public static function getDisplayTypes(array $props):array {
37 return \Civi\Api4\SearchDisplay
::getFields(FALSE)
38 ->setLoadOptions(array_diff($props, ['tag']))
39 ->addWhere('name', '=', 'type')
43 catch (\Exception
$e) {