Skip to content

Commit

Permalink
Variable update
Browse files Browse the repository at this point in the history
  • Loading branch information
Hubert Prein committed Dec 1, 2015
1 parent 0399f1f commit ee2bce4
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions variables/AmFormsVariable.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,24 @@ public function getName()
return $plugin->getName();
}

/**
* Get a setting value by their handle and type.
*
* @param string $handle
* @param string $type
* @param mixed $defaultValue
*
* @return mixed
*/
public function getSettingsValueByHandleAndType($handle, $type, $defaultValue = null)
{
return craft()->amForms_settings->getSettingsValueByHandleAndType($handle, $type, $defaultValue);
}


// Field methods
// =========================================================================

/**
* Get proper field types.
*
Expand Down Expand Up @@ -43,6 +61,10 @@ public function getFieldHandles()
return $handles;
}


// Submission methods
// =========================================================================

/**
* Returns a criteria model for AmForms_Submission elements.
*
Expand All @@ -67,6 +89,10 @@ public function getSubmissionById($id)
return craft()->amForms_submissions->getSubmissionById($id);
}


// Form methods
// =========================================================================

/**
* Get a form by its ID.
*
Expand Down Expand Up @@ -137,6 +163,10 @@ public function displayForm($handle)
return craft()->amForms_forms->displayForm($form);
}


// Anti spam methods
// =========================================================================

/**
* Display AntiSpam widget.
*
Expand Down

0 comments on commit ee2bce4

Please sign in to comment.