예제 #1
0
 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);
 }
예제 #2
0
 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');
 }
예제 #3
0
파일: grid.php 프로젝트: Roma48/mayak
 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;
 }