/views/plugins/function.label.php
PHP | 21 lines | 13 code | 8 blank | 0 comment | 1 complexity | 43c9bb23524212c50f29eefd0e7e13c5 MD5 | raw file
Possible License(s): LGPL-3.0
- <?php
- function smarty_function_label($params, $template) {
- if (empty($template->smarty->view->loaded['form'])) {
- trigger_error("{label} command requires Form helper.", E_USER_ERROR);
- }
-
- $name = 'foo';
- $text = null;
-
- extract(compact('template') + $params);
-
- unset($params['name']);
- unset($params['text']);
-
- $form = $template->smarty->view->loaded['form'];
-
-
- return $form->label($name, $text, $params);
- }