Pantheon\Terminus\Commands\Workflow\Info\OperationsCommand::operations PHP Method

operations() public method

Show operation data for a workflow
public operations ( string $site_id, $options = ['id' => null] ) : Consolidation\OutputFormatters\StructuredData\RowsOfFields
$site_id string Name or ID of the site that the workflow is part of
return Consolidation\OutputFormatters\StructuredData\RowsOfFields
    public function operations($site_id, $options = ['id' => null])
    {
        $operations = $this->getWorkflow($site_id, $options['id'])->operations();
        if (count($operations)) {
            $operations_data = array_map(function ($operation) {
                $operation_data = $operation->serialize();
                unset($operation_data['id']);
                unset($operation_data['log_output']);
                return $operation_data;
            }, $operations);
            return new RowsOfFields($operations_data);
        } else {
            $this->log()->notice('Workflow does not contain any operations.');
        }
    }
OperationsCommand