'550px', ); private $_FieldKey = ''; private $_TargetScope = 'value'; public function __construct($fieldKey) { $this->_FieldKey = $fieldKey; } public function setSettings($key, $value) { $this->_Settings[$key] = $value; } public function setTargetScope($scope) { $this->_TargetScope = $scope; } public function getTargetScope() { return $this->_TargetScope; } public function setContinueText($text) { $this->_ContinueText = $text; } public function setHeadline($text) { $this->_Headline = $text; } public function setStopText($text) { $this->_StopText = $text; } /** * @return string * @throws \Exception */ public function getHTML() { if(empty($this->_HTML)) throw new \Exception('Execute render Function before get HTML'); return $this->_HTML; } /** * @return string */ public function getJS() { return $this->_JS; } public function startRequestValues(Task $task, VTEntity $context) { $queue_id = \Workflow\Queue::addEntry($task, $context->getUser(), $context, 'static', false, 1, false); if(empty($options['successText'])) $options['successText'] = 'Execute Workflow'; // ExecutionLogger::getCurrentInstance()->log('Start Request values: '.$message); $userQueueId = \Workflow\Userqueue::add( 'requestForm', $queue_id, '', $task->getExecId(), array( "result" => "requestForm", 'form_settings' => $this->_Settings, 'crmId' => $context->getId(), 'blockId' => $task->getBlockId(), 'execId' => $task->getExecId().'##'.$task->getBlockId(), 'fields_key' => $this->_FieldKey, 'language' => array( 'Execute Workflow' => VTTemplate::parse($this->_ContinueText, $context), 'Headline' => VTTemplate::parse($this->_Headline, $context), 'StopText' => VTTemplate::parse($this->_StopText, $context), ), 'handler' => '\Workflow\RequestValuesForm', 'handlerConfig' => array( 'obj' => $this ), 'settings' => 'requestForm', ) ); $workflowObj = $task->getWorkflow(); if($workflowObj->getExecutionTrigger() != Main::MANUAL_START) { $objFrontendAction = new \Workflow\FrontendActions($context->getModuleName()); $objFrontendAction->push($context->getId(), 'requestValues', array( 'crmid' => $context->getId(), 'execid' => $task->getExecId(), 'blockid' => $task->getBlockId(), ), 'edit'); } /* if($this->getExecutionTrigger() != self::MANUAL_START) { $objFrontendAction = new \Workflow\FrontendActions($context->getModuleName()); $objFrontendAction->push($context->getId(), 'requestValues', array( 'crmid' => $context->getId(), 'execid' => $task->getExecId(), 'blockid' => $task->getBlockId(), ), 'edit'); } */ } /** * @return Row */ public function addRow() { $row = new Row($this); $this->_Rows[] = $row; return $row; } /** * @param VTEntity $context * @return string * @throws \Exception */ public function render(VTEntity $context) { $this->_HTML = ''; $this->_HTML .= '