1 <?php
2 /**
3 * @package FrameworkOnFramework
4 * @subpackage form
5 * @copyright Copyright (C) 2010-2016 Nicholas K. Dionysopoulos / Akeeba Ltd. All rights reserved.
6 * @license GNU General Public License version 2 or later; see LICENSE.txt
7 */
8 // Protect from unauthorized access
9 defined('FOF_INCLUDED') or die;
10
11 /**
12 * Generic field header, without any filters
13 *
14 * @package FrameworkOnFramework
15 * @since 2.0
16 */
17 class FOFFormHeaderField extends FOFFormHeader
18 {
19 /**
20 * Get the header
21 *
22 * @return string The header HTML
23 */
24 protected function getHeader()
25 {
26 $sortable = ($this->element['sortable'] != 'false');
27
28 $label = $this->getLabel();
29
30 if ($sortable)
31 {
32 $view = $this->form->getView();
33
34 return JHTML::_('grid.sort', $label, $this->name,
35 $view->getLists()->order_Dir, $view->getLists()->order,
36 $this->form->getModel()->task
37 );
38 }
39 else
40 {
41 return JText::_($label);
42 }
43 }
44 }
45