original_string: public function getVisibleColumns()
      {
          $definitions = $this->defineListColumns();
          $columns = [];
  
          /*
           * Supplied column list
           */
          if ($this->columnOverride === null) {
              $this->columnOverride = $this->getSession('visible', null);
          }
  
          if ($this->columnOverride && is_array($this->columnOverride)) {
  
              $invalidColumns = array_diff($this->columnOverride, array_keys($definitions));
              if (!count($definitions)) {
                  throw new ApplicationException(Lang::get(
                      'backend::lang.list.missing_column',
                      ['columns'=>implode(',', $invalidColumns)]
                  ));
              }
  
              $availableColumns = array_intersect($this->columnOverride, array_keys($definitions));
              foreach ($availableColumns as $columnName) {
                  $definitions[$columnName]->invisible = false;
                  $columns[$columnName] = $definitions[$columnName];
              }
          }
          /*
           * Use default column list
           */
          else {
              foreach ($definitions as $columnName => $column) {
                  if ($column->invisible) {
                      continue;
                  }
  
                  $columns[$columnName] = $definitions[$columnName];
              }
          }
  
          return $this->visibleColumns = $columns;
      }
code: public function getVisibleColumns()
      {
          $definitions = $this->defineListColumns();
          $columns = [];
  
          /*
           * Supplied column list
           */
          if ($this->columnOverride === null) {
              $this->columnOverride = $this->getSession('visible', null);
          }
  
          if ($this->columnOverride && is_array($this->columnOverride)) {
  
              $invalidColumns = array_diff($this->columnOverride, array_keys($definitions));
              if (!count($definitions)) {
                  throw new ApplicationException(Lang::get(
                      'backend::lang.list.missing_column',
                      ['columns'=>implode(',', $invalidColumns)]
                  ));
              }
  
              $availableColumns = array_intersect($this->columnOverride, array_keys($definitions));
              foreach ($availableColumns as $columnName) {
                  $definitions[$columnName]->invisible = false;
                  $columns[$columnName] = $definitions[$columnName];
              }
          }
          /*
           * Use default column list
           */
          else {
              foreach ($definitions as $columnName => $column) {
                  if ($column->invisible) {
                      continue;
                  }
  
                  $columns[$columnName] = $definitions[$columnName];
              }
          }
  
          return $this->visibleColumns = $columns;
      }
code_tokens: public function getVisibleColumns ( ) { $ definitions = $ this -> defineListColumns ( ) ; $ columns = [ ] ; /*
           * Supplied column list
           */ if ( $ this -> columnOverride === null ) { $ this -> columnOverride = $ this -> getSession ( 'visible' , null ) ; } if ( $ this -> columnOverride && is_array ( $ this -> columnOverride ) ) { $ invalidColumns = array_diff ( $ this -> columnOverride , array_keys ( $ definitions ) ) ; if ( ! count ( $ definitions ) ) { throw new ApplicationException ( Lang :: get ( 'backend::lang.list.missing_column' , [ 'columns' => implode ( ',' , $ invalidColumns ) ] ) ) ; } $ availableColumns = array_intersect ( $ this -> columnOverride , array_keys ( $ definitions ) ) ; foreach ( $ availableColumns as $ columnName ) { $ definitions [ $ columnName ] -> invisible = false ; $ columns [ $ columnName ] = $ definitions [ $ columnName ] ; } } /*
           * Use default column list
           */ else { foreach ( $ definitions as $ columnName => $ column ) { if ( $ column -> invisible ) { continue ; } $ columns [ $ columnName ] = $ definitions [ $ columnName ] ; } } return $ this -> visibleColumns = $ columns ; }
docstring: Returns the list columns that are visible by list settings or default
docstring_tokens: Returns the list columns that are visible by list settings or default