PageRenderTime 48ms CodeModel.GetById 17ms RepoModel.GetById 0ms app.codeStats 0ms

/views/plugins/function.hidden.php

https://github.com/sevkialacatli/CakeSmarty
PHP | 19 lines | 11 code | 8 blank | 0 comment | 1 complexity | 5ee64abf710483233f73533dea348511 MD5 | raw file
Possible License(s): LGPL-3.0
  1. <?php
  2. function smarty_function_hidden($params, $template) {
  3. if (empty($template->smarty->view->loaded['form'])) {
  4. trigger_error("{hidden} command requires Form helper.", E_USER_ERROR);
  5. }
  6. $name = 'foo';
  7. extract(compact('template') + $params);
  8. unset($params['name']);
  9. $form = $template->smarty->view->loaded['form'];
  10. return $form->hidden($name, $params);
  11. }