diff --git a/variables/AmFormsVariable.php b/variables/AmFormsVariable.php index b628642..66dc6d1 100644 --- a/variables/AmFormsVariable.php +++ b/variables/AmFormsVariable.php @@ -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. * @@ -43,6 +61,10 @@ public function getFieldHandles() return $handles; } + + // Submission methods + // ========================================================================= + /** * Returns a criteria model for AmForms_Submission elements. * @@ -67,6 +89,10 @@ public function getSubmissionById($id) return craft()->amForms_submissions->getSubmissionById($id); } + + // Form methods + // ========================================================================= + /** * Get a form by its ID. * @@ -137,6 +163,10 @@ public function displayForm($handle) return craft()->amForms_forms->displayForm($form); } + + // Anti spam methods + // ========================================================================= + /** * Display AntiSpam widget. *