public function TableHelper::setLayout in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/symfony/console/Helper/TableHelper.php \Symfony\Component\Console\Helper\TableHelper::setLayout()
Sets table layout type.
Parameters
int $layout self::LAYOUT_*:
Return value
Throws
\InvalidArgumentException when the table layout is not known
File
- vendor/
symfony/ console/ Helper/ TableHelper.php, line 55
Class
- TableHelper
- Provides helpers to display table output.
Namespace
Symfony\Component\Console\HelperCode
public function setLayout($layout) {
switch ($layout) {
case self::LAYOUT_BORDERLESS:
$this->table
->setStyle('borderless');
break;
case self::LAYOUT_COMPACT:
$this->table
->setStyle('compact');
break;
case self::LAYOUT_DEFAULT:
$this->table
->setStyle('default');
break;
default:
throw new \InvalidArgumentException(sprintf('Invalid table layout "%s".', $layout));
}
return $this;
}