Skip to content

Commit 4e84ee1

Browse files
authored
[BUGS-7496] Paging true in workflow:list depending on new all flag. (#2543)
* Paging true in workflow:list. * Add all option to workflow:list. * Reword help text.
1 parent 8033569 commit 4e84ee1

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/Commands/Workflow/ListCommand.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ class ListCommand extends TerminusCommand implements SiteAwareInterface
2525
* @command workflow:list
2626
* @aliases workflows
2727
*
28+
* @option bool $all Return all of the available workflows, not just the most recent 100
29+
*
2830
* @field-labels
2931
* id: Workflow ID
3032
* env: Environment
@@ -40,11 +42,14 @@ class ListCommand extends TerminusCommand implements SiteAwareInterface
4042
*
4143
* @usage <site> Displays the list of the workflows for <site>.
4244
*/
43-
public function wfList($site_id)
45+
public function wfList($site_id, $options = [
46+
'all' => false,
47+
])
4448
{
49+
$paging = (bool) $options['all'];
4550
$site = $this->getSiteById($site_id);
4651
return $this->getRowsOfFields(
47-
$site->getWorkflows()->setPaging(false)->fetch(),
52+
$site->getWorkflows()->setPaging($paging)->fetch(),
4853
[
4954
'message' => 'No workflows have been run on {site}.',
5055
'message_options' => ['site' => $site->getName()],

0 commit comments

Comments
 (0)