Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15431439
D9596.id22988.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D9596.id22988.diff
View Options
diff --git a/src/console/PhutilConsoleTable.php b/src/console/PhutilConsoleTable.php
--- a/src/console/PhutilConsoleTable.php
+++ b/src/console/PhutilConsoleTable.php
@@ -19,7 +19,7 @@
* 'email' => 'joe@bloggs.com',
* ))
*
- * ->setDrawBorders(true)
+ * ->setBorders(true)
* ->draw();
*/
final class PhutilConsoleTable extends Phobject {
@@ -29,6 +29,7 @@
private $widths = array();
private $borders = false;
private $padding = 1;
+ private $showHeader = true;
private $console;
const ALIGN_LEFT = 'left';
@@ -60,6 +61,12 @@
public function setPadding($padding) {
$this->padding = $padding;
+ return $this;
+ }
+
+ public function setShowHeader($show_header) {
+ $this->showHeader = $show_header;
+ return $this;
}
@@ -111,6 +118,10 @@
$output .= $this->formatSeparator('=');
}
+ if (!$this->showHeader) {
+ return $output;
+ }
+
$columns = array();
foreach ($this->columns as $key => $column) {
$columns[] = PhutilConsoleFormatter::formatString(
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Mar 25, 12:19 PM (1 d, 25 m ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7722136
Default Alt Text
D9596.id22988.diff (1 KB)
Attached To
Mode
D9596: Add a method to `PhutilConsoleTable` to hide the header.
Attached
Detach File
Event Timeline
Log In to Comment