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); }
public function __construct(KConfig $config) { parent::__construct($config); if (KFactory::get('admin::com.ninja.helper.default')->framework() != 'jquery') { JHTML::_('behavior.mootools'); } KFactory::get('admin::com.ninja.helper.default')->js('/grid.js'); KFactory::get('admin::com.ninja.helper.default')->css('/grid.css'); }
public function access($config = array()) { $config = new KConfig($config); $config->append(array('row' => null, 'field' => 'access')); if (version_compare(JVERSION, '1.6', '>=')) { $db = JFactory::getDbo(); $query = $db->getQuery(true); $query->select('a.title AS text'); $query->from('#__viewlevels AS a'); $query->where('id = ' . (int) $config->row->{$config->field}); $query->group('a.id, a.title, a.ordering'); $query->order('a.ordering ASC'); $query->order($query->qn('title') . ' ASC'); // Get the options. $db->setQuery($query); $html = $db->loadResult(); } else { $html = parent::access(); } return $html; }