/views/plugins/function.meridian.php

https://github.com/sevkialacatli/CakeSmarty · PHP · 20 lines · 13 code · 7 blank · 0 comment · 1 complexity · 7618395a7e23af8c86feb5995ebcdc90 MD5 · raw file

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