Author: sb
Date: Thu Feb 14 11:03:11 2008
New Revision: 7365
Log:
- Make inclusion of workflow variables optional.
Modified:
trunk/Workflow/src/execution/plugin/visualizer.php
Modified: trunk/Workflow/src/execution/plugin/visualizer.php
==============================================================================
--- trunk/Workflow/src/execution/plugin/visualizer.php [iso-8859-1] (original)
+++ trunk/Workflow/src/execution/plugin/visualizer.php [iso-8859-1] Thu Feb 14
11:03:11 2008
@@ -31,13 +31,21 @@
protected $fileCounter = 0;
/**
+ * Whether or not to include workflow variables.
+ *
+ * @var integer
+ */
+ protected $includeVariables = true;
+
+ /**
* Constructor.
*
- * @param string $directory
+ * @param string $directory The directory the DOT files are written to
+ * @param bool $includeVariables Whether or not to include workflow
variables
* @throws ezcBaseFileNotFoundException when the directory does not exist
* @throws ezcBaseFilePermissionException when the directory is not
writable
*/
- public function __construct( $directory )
+ public function __construct( $directory, $includeVariables = true )
{
if ( !is_dir( $directory ) )
{
@@ -49,7 +57,8 @@
throw new ezcBaseFilePermissionException( $directory,
ezcBaseFileException::WRITE );
}
- $this->directory = $directory;
+ $this->directory = $directory;
+ $this->includeVariables = $includeVariables;
}
/**
@@ -88,7 +97,16 @@
$activatedNodes[] = $node->getId();
}
- $visitor = new ezcWorkflowVisitorVisualization( $activatedNodes,
$execution->getVariables() );
+ if ( $this->includeVariables )
+ {
+ $variables = $execution->getVariables();
+ }
+ else
+ {
+ $variables = array();
+ }
+
+ $visitor = new ezcWorkflowVisitorVisualization( $activatedNodes,
$variables );
$execution->workflow->accept( $visitor );
file_put_contents(
--
svn-components mailing list
[email protected]
http://lists.ez.no/mailman/listinfo/svn-components