APIv4 - Add `@since` annotation to each entity
[civicrm-core.git] / Civi / Api4 / Address.php
index 003e5456d23d1a21d44801d3074e429cc283b18a..9861b53ee36e0dda8c72537ec346491f03acd108 100644 (file)
@@ -22,35 +22,45 @@ namespace Civi\Api4;
 /**
  * Address Entity.
  *
- * This entity holds the address informatiom of a contact. Each contact may hold
+ * This entity holds the address information of a contact. Each contact may hold
  * one or more addresses but must have different location types respectively.
  *
  * Creating a new address requires at minimum a contact's ID and location type ID
- *  and other attributes (although optional) like street address, city, country etc.
+ * and other attributes (although optional) like street address, city, country etc.
  *
+ * @ui_join_filters location_type_id
+ *
+ * @searchable secondary
+ * @since 5.19
  * @package Civi\Api4
  */
 class Address extends Generic\DAOEntity {
 
   /**
-   * @return \Civi\Api4\Action\Address\Create
+   * @param bool $checkPermissions
+   * @return Action\Address\Create
    */
-  public static function create() {
-    return new \Civi\Api4\Action\Address\Create(__CLASS__, __FUNCTION__);
+  public static function create($checkPermissions = TRUE) {
+    return (new Action\Address\Create(__CLASS__, __FUNCTION__))
+      ->setCheckPermissions($checkPermissions);
   }
 
   /**
-   * @return \Civi\Api4\Action\Address\Save
+   * @param bool $checkPermissions
+   * @return Action\Address\Save
    */
-  public static function save() {
-    return new \Civi\Api4\Action\Address\Save(__CLASS__, __FUNCTION__);
+  public static function save($checkPermissions = TRUE) {
+    return (new Action\Address\Save(__CLASS__, __FUNCTION__))
+      ->setCheckPermissions($checkPermissions);
   }
 
   /**
-   * @return \Civi\Api4\Action\Address\Update
+   * @param bool $checkPermissions
+   * @return Action\Address\Update
    */
-  public static function update() {
-    return new \Civi\Api4\Action\Address\Update(__CLASS__, __FUNCTION__);
+  public static function update($checkPermissions = TRUE) {
+    return (new Action\Address\Update(__CLASS__, __FUNCTION__))
+      ->setCheckPermissions($checkPermissions);
   }
 
 }