public function order($config = array()) { $config = new KConfig($config); $config->append(array('row' => null, 'total' => null, 'field' => 'ordering', 'data' => array('order' => 0))); if (version_compare(JVERSION, '1.6', '>=')) { $html = ''; $config->data->order = -1; $updata = str_replace('"', '"', $config->data); $config->data->order = +1; $downdata = str_replace('"', '"', $config->data); $tmpl = ' <span> <a class="jgrid" href="#" title="%s" data-action="edit" data-data="%s"> <span class="state %s" style="background-repeat: no-repeat"><span class="text">%s</span></span> </a> </span> '; if ($config->row->{$config->field} > 1) { $icon = version_compare(JVERSION, '3.0', '>=') ? '<i class="icon-arrow-up"></i>' : $this->translate('Move up'); $html .= sprintf($tmpl, $this->translate('Move up'), $updata, 'uparrow', $icon); } $html .= $config->row->{$config->field}; if ($config->row->{$config->field} != $config->total) { $icon = version_compare(JVERSION, '3.0', '>=') ? '<i class="icon-arrow-down"></i>' : $this->translate('Move down'); $html .= sprintf($tmpl, $this->translate('Move down'), $downdata, 'downarrow', $icon); } } else { $html = parent::order($config); } return $html; }
public function order($config = array()) { $config = new KConfig($config); if ($config->featured == true) { $config->field = 'featured_ordering'; $config->data = array('featured_order' => true); } return parent::order($config); }