Merge pull request #16484 from yashodha/dev_1580
[civicrm-core.git] / CRM / Core / Form / EntityFormTrait.php
index 15ff60830a797184fd2a658b2b88cbc2937a128b..5ebf4441e8f8297156ed38c57b82400833172fdd 100644 (file)
  */
 trait CRM_Core_Form_EntityFormTrait {
 
+  /**
+   * The id of the object being edited / created.
+   *
+   * @var int
+   */
+  public $_id;
+
   /**
    * The entity subtype ID (eg. for Relationship / Activity)
    *
@@ -71,6 +78,15 @@ trait CRM_Core_Form_EntityFormTrait {
     return $this->_id;
   }
 
+  /**
+   * Set the entity ID
+   *
+   * @param int $id The entity ID
+   */
+  public function setEntityId($id) {
+    $this->_id = $id;
+  }
+
   /**
    * Should custom data be suppressed on this form.
    *