/views/plugins/function.inputs.php

https://github.com/sevkialacatli/CakeSmarty · PHP · 19 lines · 11 code · 8 blank · 0 comment · 1 complexity · f6f4b536798d62ae5d95ba9a792cee2e MD5 · raw file

  1. <?php
  2. function smarty_function_inputs($params, $template) {
  3. if (empty($template->smarty->view->loaded['form'])) {
  4. trigger_error("{inputs} command requires Form helper.", E_USER_ERROR);
  5. }
  6. $fields = null;
  7. extract(compact('template') + $params);
  8. unset($params['fields']);
  9. $form = $template->smarty->view->loaded['form'];
  10. return $form->inputs($fields, $params);
  11. }