Merge pull request #20431 from colemanw/garlandTabFix
[civicrm-core.git] / Civi / Api4 / CiviCase.php
1 <?php
2
3 /*
4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC. All rights reserved. |
6 | |
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 +--------------------------------------------------------------------+
11 */
12
13 /**
14 *
15 * @package CRM
16 * @copyright CiviCRM LLC https://civicrm.org/licensing
17 */
18
19
20 namespace Civi\Api4;
21
22 /**
23 * Case entity.
24 *
25 * Note that the class for this entity is named "CiviCase" because "Case" is a keyword reserved by php.
26 *
27 * @see https://docs.civicrm.org/user/en/latest/case-management/what-is-civicase/
28 * @searchable primary
29 * @package Civi\Api4
30 */
31 class CiviCase extends Generic\DAOEntity {
32
33 /**
34 * Explicitly declare entity name because it doesn't match the name of this class
35 * (due to the php reserved keyword issue)
36 *
37 * @return string
38 */
39 protected static function getEntityName() {
40 return 'Case';
41 }
42
43 /**
44 * @param bool $checkPermissions
45 * @return Action\CiviCase\Create
46 */
47 public static function create($checkPermissions = TRUE) {
48 return (new Action\CiviCase\Create('Case', __FUNCTION__))
49 ->setCheckPermissions($checkPermissions);
50 }
51
52 /**
53 * @param bool $checkPermissions
54 * @return Action\CiviCase\Save
55 */
56 public static function save($checkPermissions = TRUE) {
57 return (new Action\CiviCase\Save('Case', __FUNCTION__))
58 ->setCheckPermissions($checkPermissions);
59 }
60
61 /**
62 * @param bool $checkPermissions
63 * @return Action\CiviCase\Update
64 */
65 public static function update($checkPermissions = TRUE) {
66 return (new Action\CiviCase\Update('Case', __FUNCTION__))
67 ->setCheckPermissions($checkPermissions);
68 }
69
70 }