code/libraries/joomlatools/component/koowa/template/helper/grid.php
public function access($config = array())
    {
        $config = new KObjectConfigJson($config);
        $config->append(array(
            'entity'  		=> null,
            'field'		=> 'access'
        ));

        $db = JFactory::getDbo();
        $query = $db->getQuery(true);

        $query->select('a.title AS text');
        $query->from('#__viewlevels AS a');
        $query->where('id = '.(int) $config->entity->{$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();

        return $html;
    }
public function access($config = array())
    {
        $config = new KObjectConfigJson($config);
        $config->append(array(
            'entity'  		=> null,
            'field'		=> 'access'
        ));

        $db = JFactory::getDbo();
        $query = $db->getQuery(true);

        $query->select('a.title AS text');
        $query->from('#__viewlevels AS a');
        $query->where('id = '.(int) $config->entity->{$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();

        return $html;
    }
public function access ( $ config = array ( ) ) { $ config = new KObjectConfigJson ( $ config ) ; $ config -> append ( array ( 'entity' => null , 'field' => 'access' ) ) ; $ db = JFactory :: getDbo ( ) ; $ query = $ db -> getQuery ( true ) ; $ query -> select ( 'a.title AS text' ) ; $ query -> from ( '#__viewlevels AS a' ) ; $ query -> where ( 'id = ' . ( int ) $ config -> entity -> { $ 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 ( ) ; return $ html ; }
Render an access field

@param   array   $config An optional array with configuration options
@return  string  Html
Render an access field