original_string: protected function getTableHeader($dbm = null)
  	{
  		$dbm = $dbm ? $dbm : new DBM;
  		$columns = array();
  		$form_input = $this->getFormInput();
  
  		if( $form_input['table_name'] )
  		{
  			$dbal_columns = $dbm->getTableColumns($this->form_input['table_name']);
  			foreach($dbal_columns as $column)
  			{
  				$array_columns = $column->toArray();
  				$columns[] = $array_columns["name"];
  			}
  		}
  		else
  		{
  			throw new \BadMethodCallException;
  		}
  
  		return $columns;
  	}
code: protected function getTableHeader($dbm = null)
  	{
  		$dbm = $dbm ? $dbm : new DBM;
  		$columns = array();
  		$form_input = $this->getFormInput();
  
  		if( $form_input['table_name'] )
  		{
  			$dbal_columns = $dbm->getTableColumns($this->form_input['table_name']);
  			foreach($dbal_columns as $column)
  			{
  				$array_columns = $column->toArray();
  				$columns[] = $array_columns["name"];
  			}
  		}
  		else
  		{
  			throw new \BadMethodCallException;
  		}
  
  		return $columns;
  	}
code_tokens: protected function getTableHeader ( $ dbm = null ) { $ dbm = $ dbm ? $ dbm : new DBM ; $ columns = array ( ) ; $ form_input = $ this -> getFormInput ( ) ; if ( $ form_input [ 'table_name' ] ) { $ dbal_columns = $ dbm -> getTableColumns ( $ this -> form_input [ 'table_name' ] ) ; foreach ( $ dbal_columns as $ column ) { $ array_columns = $ column -> toArray ( ) ; $ columns [ ] = $ array_columns [ "name" ] ; } } else { throw new \ BadMethodCallException ; } return $ columns ; }
docstring: Get the header for the preview
  
  @throws  BadMethodCallException
  @return  Array $columns
docstring_tokens: Get the header for the preview