4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC. All rights reserved. |
7 | This work is published under the GNU AGPLv3 license with some |
8 | permitted exceptions and without any warranty. For full license |
9 | and copyright information, see https://civicrm.org/licensing |
10 +--------------------------------------------------------------------+
16 * @copyright CiviCRM LLC https://civicrm.org/licensing
23 * Retrieves information about all Api4 entities.
25 * @see \Civi\Api4\Generic\AbstractEntity
29 class Entity
extends Generic\AbstractEntity
{
32 * @param bool $checkPermissions
33 * @return Action\Entity\Get
35 public static function get($checkPermissions = TRUE) {
36 return (new Action\Entity\
Get('Entity', __FUNCTION__
))
37 ->setCheckPermissions($checkPermissions);
41 * @param bool $checkPermissions
42 * @return Generic\BasicGetFieldsAction
44 public static function getFields($checkPermissions = TRUE) {
45 return (new Generic\
BasicGetFieldsAction('Entity', __FUNCTION__
, function() {
49 'description' => 'Entity name',
53 'description' => 'Localized title (singular)',
56 'name' => 'title_plural',
57 'description' => 'Localized title (plural)',
61 'data_type' => 'Array',
62 'description' => 'Base class for this entity',
64 'AbstractEntity' => 'AbstractEntity',
65 'DAOEntity' => 'DAOEntity',
66 'BasicEntity' => 'BasicEntity',
67 'EntityBridge' => 'EntityBridge',
68 'OptionList' => 'OptionList',
72 'name' => 'description',
73 'description' => 'Description from docblock',
77 'description' => 'Comments from docblock',
81 'description' => 'crm-i icon class associated with this entity',
85 'description' => 'Class name for dao-based entities',
88 'name' => 'searchable',
89 'description' => 'Should this entity be selectable in search kit UI',
93 'data_type' => 'Array',
94 'description' => 'System paths for accessing this entity',
98 'data_type' => 'Array',
99 'description' => 'Any @see annotations from docblock',
103 'data_type' => 'Array',
104 'description' => 'Connecting fields for EntityBridge types',
107 }))->setCheckPermissions($checkPermissions);
111 * @param bool $checkPermissions
112 * @return Action\Entity\GetLinks
114 public static function getLinks($checkPermissions = TRUE) {
115 return (new Action\Entity\
GetLinks('Entity', __FUNCTION__
))
116 ->setCheckPermissions($checkPermissions);
122 public static function permissions() {
124 'default' => ['access CiviCRM'],