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