original_string: protected function _generateTableColumns($model)
      {
          $model = TableRegistry::get($model);
          $columns = ConnectionManager::get('default')->schemaCollection()->describe($model->table())->columns();
  
          $result = [];
          $counter = 0;
          $max = 2;
  
          if (in_array('id', $columns)) {
              $result['id'] = [];
              unset($columns['id']);
          }
  
          foreach ($columns as $column) {
              if ($counter < $max) {
                  $result[$column] = [];
                  unset($columns[$column]);
                  $counter++;
              }
          }
  
          if (in_array('created', $columns)) {
              $result['created'] = [];
          }
  
          return $result;
      }
code: protected function _generateTableColumns($model)
      {
          $model = TableRegistry::get($model);
          $columns = ConnectionManager::get('default')->schemaCollection()->describe($model->table())->columns();
  
          $result = [];
          $counter = 0;
          $max = 2;
  
          if (in_array('id', $columns)) {
              $result['id'] = [];
              unset($columns['id']);
          }
  
          foreach ($columns as $column) {
              if ($counter < $max) {
                  $result[$column] = [];
                  unset($columns[$column]);
                  $counter++;
              }
          }
  
          if (in_array('created', $columns)) {
              $result['created'] = [];
          }
  
          return $result;
      }
code_tokens: protected function _generateTableColumns ( $ model ) { $ model = TableRegistry :: get ( $ model ) ; $ columns = ConnectionManager :: get ( 'default' ) -> schemaCollection ( ) -> describe ( $ model -> table ( ) ) -> columns ( ) ; $ result = [ ] ; $ counter = 0 ; $ max = 2 ; if ( in_array ( 'id' , $ columns ) ) { $ result [ 'id' ] = [ ] ; unset ( $ columns [ 'id' ] ) ; } foreach ( $ columns as $ column ) { if ( $ counter < $ max ) { $ result [ $ column ] = [ ] ; unset ( $ columns [ $ column ] ) ; $ counter ++ ; } } if ( in_array ( 'created' , $ columns ) ) { $ result [ 'created' ] = [ ] ; } return $ result ; }
docstring: If no tablecolumns are given, this method will be called to generate a list of tablecolumns.
  
  @param \Cake\ORM\Table $model Model to rely on.
  @return array
docstring_tokens: If no tablecolumns are given this method will be called to generate a list of tablecolumns .