1<?php
2
3/**
4 * Allows adding a single struct field as a bureaucracy hidden field
5 *
6 * This class is used when a field of the type struct_fieldhidden is encountered in the
7 * bureaucracy syntax.
8 */
9class helper_plugin_struct_fieldhidden extends helper_plugin_struct_field
10{
11    /**
12     * Render the field as XHTML
13     *
14     * Outputs the represented field using the passed Doku_Form object.
15     *
16     * @param array $params Additional HTML specific parameters
17     * @param Doku_Form $form The target Doku_Form object
18     * @param int $formid unique identifier of the form which contains this field
19     */
20    public function renderfield($params, Doku_Form $form, $formid)
21    {
22        $this->_handlePreload();
23        $form->addHidden($params['name'], $this->getParam('value') . '');
24    }
25}
26