PageRenderTime 41ms CodeModel.GetById 16ms RepoModel.GetById 1ms app.codeStats 0ms

/views/plugins/function.month.php

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