add comments

This commit is contained in:
Marc Michalsky forumZFD 2020-09-28 14:13:19 +02:00
parent 3f3a8eb04d
commit f54f3bf262
Signed by untrusted user who does not match committer: marc.koch
GPG key ID: 12406554CFB028B9
3 changed files with 32 additions and 7 deletions

View file

@ -53,6 +53,10 @@ class TwingleProject {
}
/**
* Get all related custom fields as CustomField objects in an static array.
* This function will be fully executed only once, when the TwingleProject
* class gets instantiated for the first time.
*
* @throws \Exception
*/
private static function init() {
@ -77,6 +81,12 @@ class TwingleProject {
self::$bInitialized = TRUE;
}
/**
* Create the project as a campaign in CiviCRM if it does not exist
*
* @return array
* @throws \CiviCRM_API3_Exception
*/
public function create() {
$values = $this->values;
try {
@ -86,6 +96,11 @@ class TwingleProject {
}
}
/**
* Formats values to import them as campaigns
*
* @param $values
*/
private function formatForImport(&$values) {
// Change timestamp into DateTime string
@ -100,6 +115,11 @@ class TwingleProject {
}
}
/**
* Formats values to send them to Twingle API
*
* @param $values
*/
private function formatForExport(&$values) {
// Change DateTime string into timestamp