Skip to content

Instantly share code, notes, and snippets.

@makhnanov
Created August 3, 2023 10:57
Show Gist options
  • Save makhnanov/1d9652f082a23a71544fd559e1a309da to your computer and use it in GitHub Desktop.
Save makhnanov/1d9652f082a23a71544fd559e1a309da to your computer and use it in GitHub Desktop.
Yii2 yii\console\widgets\Table to markdown style to output.
$table->setListPrefix('');
$table->setChars([
Table::CHAR_TOP => '',
Table::CHAR_TOP_MID => '',
Table::CHAR_TOP_LEFT => '',
Table::CHAR_TOP_RIGHT => '',
Table::CHAR_BOTTOM => '',
Table::CHAR_BOTTOM_MID => '',
Table::CHAR_BOTTOM_LEFT => '',
Table::CHAR_BOTTOM_RIGHT => '',
Table::CHAR_LEFT => '|',
Table::CHAR_LEFT_MID => '|',
Table::CHAR_MID => '-',
Table::CHAR_MID_MID => '|',
Table::CHAR_RIGHT => '|',
Table::CHAR_RIGHT_MID => '|',
Table::CHAR_MIDDLE => '|',
]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment