Skip to content

Instantly share code, notes, and snippets.

@jec006
Created July 12, 2012 19:55
Show Gist options
  • Save jec006/3100532 to your computer and use it in GitHub Desktop.
Save jec006/3100532 to your computer and use it in GitHub Desktop.
GetForm
<?php
/**
* Passthrough from Drupal form to the correct condition for building the preview form
*
* @param $form
* The form array used in hook_form
* @param $form_state
* The form_state array as used in hook_form
*
* @return
* A drupal form array created by the root condition
*/
public function getPreviewForm($form, &$form_state) {
$root_condition = $this->getRootCondition();
return drupal_get_form('sps_condition_preview_form', array($root_condition, 'getElement'));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment