1 <?php
2 /**
3 * @package Joomla.Platform
4 * @subpackage Form
5 *
6 * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved.
7 * @license GNU General Public License version 2 or later; see LICENSE
8 */
9
10 defined('JPATH_PLATFORM') or die;
11
12 /**
13 * Form Field class for the Joomla Platform.
14 * Provides a hidden field
15 *
16 * @link http://www.w3.org/TR/html-markup/input.hidden.html#input.hidden
17 * @since 11.1
18 */
19 class JFormFieldHidden extends JFormField
20 {
21 /**
22 * The form field type.
23 *
24 * @var string
25 * @since 11.1
26 */
27 protected $type = 'Hidden';
28
29 /**
30 * Name of the layout being used to render the field
31 *
32 * @var string
33 * @since 3.7
34 */
35 protected $layout = 'joomla.form.field.hidden';
36
37 /**
38 * Method to get the field input markup.
39 *
40 * @return string The field input markup.
41 *
42 * @since 11.1
43 */
44 protected function getInput()
45 {
46 // Trim the trailing line in the layout file
47 return rtrim($this->getRenderer($this->layout)->render($this->getLayoutData()), PHP_EOL);
48 }
49
50 /**
51 * Method to get the data to be passed to the layout for rendering.
52 *
53 * @return array
54 *
55 * @since 3.7
56 */
57 protected function getLayoutData()
58 {
59 return parent::getLayoutData();
60 }
61 }
62