16.include.cache.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?php
  2. /**
  3. * FormIt
  4. *
  5. * Copyright 2009-2012 by Shaun McCormick <shaun@modx.com>
  6. *
  7. * FormIt is free software; you can redistribute it and/or modify it
  8. * under the terms of the GNU General Public License as published by the Free
  9. * Software Foundation; either version 2 of the License, or (at your option) any
  10. * later version.
  11. *
  12. * FormIt is distributed in the hope that it will be useful, but WITHOUT ANY
  13. * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
  14. * A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License along with
  17. * FormIt; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
  18. * Suite 330, Boston, MA 02111-1307 USA
  19. *
  20. * @package formit
  21. */
  22. /**
  23. * FormIt
  24. *
  25. * A dynamic form processing Snippet for MODx Revolution.
  26. *
  27. * @var modX $modx
  28. * @var array $scriptProperties
  29. *
  30. * @package formit
  31. */
  32. $modelPath = $modx->getOption(
  33. 'formit.core_path',
  34. null,
  35. $modx->getOption('core_path', null, MODX_CORE_PATH) . 'components/formit/'
  36. ) . 'model/formit/';
  37. $modx->loadClass('FormIt', $modelPath, true, true);
  38. $fi = new FormIt($modx, $scriptProperties);
  39. $fi->initialize($modx->context->get('key'));
  40. $fi->loadRequest();
  41. $fields = $fi->request->prepare();
  42. return $fi->request->handle($fields);
  43. return;