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
25 * Retrieves information about all Api4 entities.
27 * @see \Civi\Api4\Generic\AbstractEntity
31 class Entity
extends Generic\AbstractEntity
{
34 * @param bool $checkPermissions
35 * @return Action\Entity\Get
37 public static function get($checkPermissions = TRUE) {
38 return (new Action\Entity\
Get('Entity', __FUNCTION__
))
39 ->setCheckPermissions($checkPermissions);
43 * @param bool $checkPermissions
44 * @return Generic\BasicGetFieldsAction
46 public static function getFields($checkPermissions = TRUE) {
47 return (new Generic\
BasicGetFieldsAction('Entity', __FUNCTION__
, function() {
51 'description' => 'Entity name',
55 'description' => 'Localized title',
58 'name' => 'description',
59 'description' => 'Description from docblock',
63 'description' => 'Comments from docblock',
67 'description' => 'crm-i icon class associated with this entity',
71 'description' => 'Class name for dao-based entities',
75 'data_type' => 'Array',
76 'description' => 'Any @see annotations from docblock',
79 }))->setCheckPermissions($checkPermissions);
83 * @param bool $checkPermissions
84 * @return Action\Entity\GetLinks
86 public static function getLinks($checkPermissions = TRUE) {
87 return (new Action\Entity\
GetLinks('Entity', __FUNCTION__
))
88 ->setCheckPermissions($checkPermissions);
94 public static function permissions() {
96 'default' => ['access CiviCRM'],