/**
*
* @param int $versionId, id of the current workflow
* @param String $text, the text to replace
* @param String $culture, the language
* @param sfContext $context , context object
*/
public function __construct($versionId, $text, $culture, $context = false) {
if($context == false) {
sfLoader::loadHelpers('Date');
}
else {
$context->getConfiguration()->loadHelpers('Date');
}
$this->setWorkflow($versionId);
$this->setWorkflowVersion($versionId);
$this->culture = $culture;
$this->theSender = new UserMailSettings($this->workflow['sender_id']);
$this->newText = $this->replacePlaceholder($text);
}