|
|
|
|
@@ -1,87 +1,57 @@
|
|
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace ProcessMaker\BusinessModel;
|
|
|
|
|
|
|
|
|
|
use \G;
|
|
|
|
|
use Exception;
|
|
|
|
|
use G;
|
|
|
|
|
use ProcessMaker\Model\OutputDocument as ModelOutputDocument;
|
|
|
|
|
|
|
|
|
|
class OutputDocument
|
|
|
|
|
{
|
|
|
|
|
/**
|
|
|
|
|
* Return output documents of a project
|
|
|
|
|
* @param string $sProcessUID
|
|
|
|
|
* Return output documents of a project.
|
|
|
|
|
* @param string $proUid
|
|
|
|
|
* @return array
|
|
|
|
|
*
|
|
|
|
|
* @access public
|
|
|
|
|
*/
|
|
|
|
|
public function getOutputDocuments($sProcessUID = '')
|
|
|
|
|
public function getOutputDocuments($proUid = '')
|
|
|
|
|
{
|
|
|
|
|
try {
|
|
|
|
|
$sDelimiter = \DBAdapter::getStringDelimiter();
|
|
|
|
|
$oCriteria = new \Criteria('workflow');
|
|
|
|
|
$oCriteria->addSelectColumn(\OutputDocumentPeer::OUT_DOC_UID);
|
|
|
|
|
$oCriteria->addSelectColumn(\OutputDocumentPeer::OUT_DOC_TYPE);
|
|
|
|
|
$oCriteria->addSelectColumn(\OutputDocumentPeer::PRO_UID);
|
|
|
|
|
$oCriteria->addSelectColumn(\OutputDocumentPeer::OUT_DOC_REPORT_GENERATOR);
|
|
|
|
|
$oCriteria->addSelectColumn(\OutputDocumentPeer::OUT_DOC_LANDSCAPE);
|
|
|
|
|
$oCriteria->addSelectColumn(\OutputDocumentPeer::OUT_DOC_MEDIA);
|
|
|
|
|
$oCriteria->addSelectColumn(\OutputDocumentPeer::OUT_DOC_LEFT_MARGIN);
|
|
|
|
|
$oCriteria->addSelectColumn(\OutputDocumentPeer::OUT_DOC_RIGHT_MARGIN);
|
|
|
|
|
$oCriteria->addSelectColumn(\OutputDocumentPeer::OUT_DOC_TOP_MARGIN);
|
|
|
|
|
$oCriteria->addSelectColumn(\OutputDocumentPeer::OUT_DOC_BOTTOM_MARGIN);
|
|
|
|
|
$oCriteria->addSelectColumn(\OutputDocumentPeer::OUT_DOC_GENERATE);
|
|
|
|
|
$oCriteria->addSelectColumn(\OutputDocumentPeer::OUT_DOC_TYPE);
|
|
|
|
|
$oCriteria->addSelectColumn(\OutputDocumentPeer::OUT_DOC_CURRENT_REVISION);
|
|
|
|
|
$oCriteria->addSelectColumn(\OutputDocumentPeer::OUT_DOC_FIELD_MAPPING);
|
|
|
|
|
$oCriteria->addSelectColumn(\OutputDocumentPeer::OUT_DOC_VERSIONING);
|
|
|
|
|
$oCriteria->addSelectColumn(\OutputDocumentPeer::OUT_DOC_DESTINATION_PATH);
|
|
|
|
|
$oCriteria->addSelectColumn(\OutputDocumentPeer::OUT_DOC_TAGS);
|
|
|
|
|
$oCriteria->addSelectColumn(\OutputDocumentPeer::OUT_DOC_PDF_SECURITY_ENABLED);
|
|
|
|
|
$oCriteria->addSelectColumn(\OutputDocumentPeer::OUT_DOC_PDF_SECURITY_OPEN_PASSWORD);
|
|
|
|
|
$oCriteria->addSelectColumn(\OutputDocumentPeer::OUT_DOC_PDF_SECURITY_OWNER_PASSWORD);
|
|
|
|
|
$oCriteria->addSelectColumn(\OutputDocumentPeer::OUT_DOC_PDF_SECURITY_PERMISSIONS);
|
|
|
|
|
$oCriteria->addSelectColumn(\OutputDocumentPeer::OUT_DOC_OPEN_TYPE);
|
|
|
|
|
$oCriteria->addSelectColumn(\OutputDocumentPeer::OUT_DOC_TITLE);
|
|
|
|
|
$oCriteria->addSelectColumn(\OutputDocumentPeer::OUT_DOC_DESCRIPTION);
|
|
|
|
|
$oCriteria->addSelectColumn(\OutputDocumentPeer::OUT_DOC_FILENAME);
|
|
|
|
|
$oCriteria->addSelectColumn(\OutputDocumentPeer::OUT_DOC_TEMPLATE);
|
|
|
|
|
$oCriteria->add(\OutputDocumentPeer::PRO_UID, $sProcessUID);
|
|
|
|
|
$oDataset = \OutputDocumentPeer::doSelectRS($oCriteria);
|
|
|
|
|
$oDataset->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
|
|
|
|
|
$oDataset->next();
|
|
|
|
|
$outputDocArray = array();
|
|
|
|
|
while ($aRow = $oDataset->getRow()) {
|
|
|
|
|
if (($aRow['OUT_DOC_TITLE'] == null) || ($aRow['OUT_DOC_TITLE'] == "")) {
|
|
|
|
|
// There is no transaltion for this Document name, try to get/regenerate the label
|
|
|
|
|
$outputDocument = new \OutputDocument();
|
|
|
|
|
$outputDocumentObj = $outputDocument->load($aRow['OUT_DOC_UID']);
|
|
|
|
|
$aRow['OUT_DOC_TITLE'] = $outputDocumentObj['OUT_DOC_TITLE'];
|
|
|
|
|
$aRow['OUT_DOC_DESCRIPTION'] = $outputDocumentObj['OUT_DOC_DESCRIPTION'];
|
|
|
|
|
} else {
|
|
|
|
|
$outputDocArray[] = array('out_doc_uid' => $aRow['OUT_DOC_UID'],
|
|
|
|
|
'out_doc_title' => $aRow['OUT_DOC_TITLE'],
|
|
|
|
|
'out_doc_description' => $aRow['OUT_DOC_DESCRIPTION'],
|
|
|
|
|
'out_doc_filename' => $aRow['OUT_DOC_FILENAME'],
|
|
|
|
|
'out_doc_template' => $aRow['OUT_DOC_TEMPLATE'],
|
|
|
|
|
'out_doc_report_generator' => $aRow['OUT_DOC_REPORT_GENERATOR'],
|
|
|
|
|
'out_doc_landscape' => $aRow['OUT_DOC_LANDSCAPE'],
|
|
|
|
|
'out_doc_media' => $aRow['OUT_DOC_MEDIA'],
|
|
|
|
|
'out_doc_left_margin' => $aRow['OUT_DOC_LEFT_MARGIN'],
|
|
|
|
|
'out_doc_right_margin' => $aRow['OUT_DOC_RIGHT_MARGIN'],
|
|
|
|
|
'out_doc_top_margin' => $aRow['OUT_DOC_TOP_MARGIN'],
|
|
|
|
|
'out_doc_bottom_margin' => $aRow['OUT_DOC_BOTTOM_MARGIN'],
|
|
|
|
|
'out_doc_generate' => $aRow['OUT_DOC_GENERATE'],
|
|
|
|
|
'out_doc_type' => $aRow['OUT_DOC_TYPE'],
|
|
|
|
|
'out_doc_current_revision' => $aRow['OUT_DOC_CURRENT_REVISION'],
|
|
|
|
|
'out_doc_field_mapping' => $aRow['OUT_DOC_FIELD_MAPPING'],
|
|
|
|
|
'out_doc_versioning' => $aRow['OUT_DOC_VERSIONING'],
|
|
|
|
|
'out_doc_destination_path' => $aRow['OUT_DOC_DESTINATION_PATH'],
|
|
|
|
|
'out_doc_tags' => $aRow['OUT_DOC_TAGS'],
|
|
|
|
|
'out_doc_pdf_security_enabled' => $aRow['OUT_DOC_PDF_SECURITY_ENABLED'],
|
|
|
|
|
'out_doc_pdf_security_permissions' => $aRow['OUT_DOC_PDF_SECURITY_PERMISSIONS'],
|
|
|
|
|
"out_doc_open_type" => $aRow["OUT_DOC_OPEN_TYPE"]);
|
|
|
|
|
$result = [];
|
|
|
|
|
$outputDocuments = ModelOutputDocument::select()
|
|
|
|
|
->where('PRO_UID', '=', $proUid)
|
|
|
|
|
->get();
|
|
|
|
|
foreach ($outputDocuments as $value) {
|
|
|
|
|
if (!empty($value->OUT_DOC_TITLE)) {
|
|
|
|
|
$result[] = [
|
|
|
|
|
'out_doc_uid' => $value->OUT_DOC_UID,
|
|
|
|
|
'out_doc_title' => $value->OUT_DOC_TITLE,
|
|
|
|
|
'out_doc_description' => $value->OUT_DOC_DESCRIPTION,
|
|
|
|
|
'out_doc_filename' => $value->OUT_DOC_FILENAME,
|
|
|
|
|
'out_doc_template' => $value->OUT_DOC_TEMPLATE,
|
|
|
|
|
'out_doc_report_generator' => $value->OUT_DOC_REPORT_GENERATOR,
|
|
|
|
|
'out_doc_landscape' => $value->OUT_DOC_LANDSCAPE,
|
|
|
|
|
'out_doc_media' => $value->OUT_DOC_MEDIA,
|
|
|
|
|
'out_doc_left_margin' => $value->OUT_DOC_LEFT_MARGIN,
|
|
|
|
|
'out_doc_right_margin' => $value->OUT_DOC_RIGHT_MARGIN,
|
|
|
|
|
'out_doc_top_margin' => $value->OUT_DOC_TOP_MARGIN,
|
|
|
|
|
'out_doc_bottom_margin' => $value->OUT_DOC_BOTTOM_MARGIN,
|
|
|
|
|
'out_doc_generate' => $value->OUT_DOC_GENERATE,
|
|
|
|
|
'out_doc_type' => $value->OUT_DOC_TYPE,
|
|
|
|
|
'out_doc_current_revision' => $value->OUT_DOC_CURRENT_REVISION,
|
|
|
|
|
'out_doc_field_mapping' => $value->OUT_DOC_FIELD_MAPPING,
|
|
|
|
|
'out_doc_versioning' => $value->OUT_DOC_VERSIONING,
|
|
|
|
|
'out_doc_destination_path' => $value->OUT_DOC_DESTINATION_PATH,
|
|
|
|
|
'out_doc_tags' => $value->OUT_DOC_TAGS,
|
|
|
|
|
'out_doc_pdf_security_enabled' => $value->OUT_DOC_PDF_SECURITY_ENABLED,
|
|
|
|
|
'out_doc_pdf_security_permissions' => $value->OUT_DOC_PDF_SECURITY_PERMISSIONS,
|
|
|
|
|
'out_doc_open_type' => $value->OUT_DOC_OPEN_TYPE,
|
|
|
|
|
'out_doc_header' => json_decode($value->OUT_DOC_HEADER),
|
|
|
|
|
'out_doc_footer' => json_decode($value->OUT_DOC_FOOTER)
|
|
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
$oDataset->next();
|
|
|
|
|
}
|
|
|
|
|
return $outputDocArray;
|
|
|
|
|
return $result;
|
|
|
|
|
} catch (Exception $e) {
|
|
|
|
|
throw $e;
|
|
|
|
|
}
|
|
|
|
|
@@ -89,83 +59,51 @@ class OutputDocument
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Return a single output document of a project
|
|
|
|
|
* @param string $sProcessUID
|
|
|
|
|
* @param string $sOutputDocumentUID
|
|
|
|
|
* @param string $proUid
|
|
|
|
|
* @param string $outDocUid
|
|
|
|
|
* @return array
|
|
|
|
|
*
|
|
|
|
|
* @access public
|
|
|
|
|
*/
|
|
|
|
|
public function getOutputDocument($sProcessUID = '', $sOutputDocumentUID = '')
|
|
|
|
|
public function getOutputDocument($proUid = '', $outDocUid = '')
|
|
|
|
|
{
|
|
|
|
|
try {
|
|
|
|
|
$sDelimiter = \DBAdapter::getStringDelimiter();
|
|
|
|
|
$oCriteria = new \Criteria('workflow');
|
|
|
|
|
$oCriteria->addSelectColumn(\OutputDocumentPeer::OUT_DOC_UID);
|
|
|
|
|
$oCriteria->addSelectColumn(\OutputDocumentPeer::OUT_DOC_TYPE);
|
|
|
|
|
$oCriteria->addSelectColumn(\OutputDocumentPeer::PRO_UID);
|
|
|
|
|
$oCriteria->addSelectColumn(\OutputDocumentPeer::OUT_DOC_REPORT_GENERATOR);
|
|
|
|
|
$oCriteria->addSelectColumn(\OutputDocumentPeer::OUT_DOC_LANDSCAPE);
|
|
|
|
|
$oCriteria->addSelectColumn(\OutputDocumentPeer::OUT_DOC_MEDIA);
|
|
|
|
|
$oCriteria->addSelectColumn(\OutputDocumentPeer::OUT_DOC_LEFT_MARGIN);
|
|
|
|
|
$oCriteria->addSelectColumn(\OutputDocumentPeer::OUT_DOC_RIGHT_MARGIN);
|
|
|
|
|
$oCriteria->addSelectColumn(\OutputDocumentPeer::OUT_DOC_TOP_MARGIN);
|
|
|
|
|
$oCriteria->addSelectColumn(\OutputDocumentPeer::OUT_DOC_BOTTOM_MARGIN);
|
|
|
|
|
$oCriteria->addSelectColumn(\OutputDocumentPeer::OUT_DOC_GENERATE);
|
|
|
|
|
$oCriteria->addSelectColumn(\OutputDocumentPeer::OUT_DOC_TYPE);
|
|
|
|
|
$oCriteria->addSelectColumn(\OutputDocumentPeer::OUT_DOC_CURRENT_REVISION);
|
|
|
|
|
$oCriteria->addSelectColumn(\OutputDocumentPeer::OUT_DOC_FIELD_MAPPING);
|
|
|
|
|
$oCriteria->addSelectColumn(\OutputDocumentPeer::OUT_DOC_VERSIONING);
|
|
|
|
|
$oCriteria->addSelectColumn(\OutputDocumentPeer::OUT_DOC_DESTINATION_PATH);
|
|
|
|
|
$oCriteria->addSelectColumn(\OutputDocumentPeer::OUT_DOC_TAGS);
|
|
|
|
|
$oCriteria->addSelectColumn(\OutputDocumentPeer::OUT_DOC_PDF_SECURITY_ENABLED);
|
|
|
|
|
$oCriteria->addSelectColumn(\OutputDocumentPeer::OUT_DOC_PDF_SECURITY_OPEN_PASSWORD);
|
|
|
|
|
$oCriteria->addSelectColumn(\OutputDocumentPeer::OUT_DOC_PDF_SECURITY_OWNER_PASSWORD);
|
|
|
|
|
$oCriteria->addSelectColumn(\OutputDocumentPeer::OUT_DOC_PDF_SECURITY_PERMISSIONS);
|
|
|
|
|
$oCriteria->addSelectColumn(\OutputDocumentPeer::OUT_DOC_OPEN_TYPE);
|
|
|
|
|
$oCriteria->addSelectColumn(\OutputDocumentPeer::OUT_DOC_TITLE);
|
|
|
|
|
$oCriteria->addSelectColumn(\OutputDocumentPeer::OUT_DOC_DESCRIPTION);
|
|
|
|
|
$oCriteria->addSelectColumn(\OutputDocumentPeer::OUT_DOC_FILENAME);
|
|
|
|
|
$oCriteria->addSelectColumn(\OutputDocumentPeer::OUT_DOC_TEMPLATE);
|
|
|
|
|
$oCriteria->add(\OutputDocumentPeer::OUT_DOC_UID, $sOutputDocumentUID);
|
|
|
|
|
$oCriteria->add(\OutputDocumentPeer::PRO_UID, $sProcessUID);
|
|
|
|
|
$oDataset = \OutputDocumentPeer::doSelectRS($oCriteria);
|
|
|
|
|
$oDataset->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
|
|
|
|
|
$oDataset->next();
|
|
|
|
|
$outputDocArray = array();
|
|
|
|
|
while ($aRow = $oDataset->getRow()) {
|
|
|
|
|
if (($aRow['OUT_DOC_TITLE'] == null) || ($aRow['OUT_DOC_TITLE'] == "")) {
|
|
|
|
|
// There is no transaltion for this Document name, try to get/regenerate the label
|
|
|
|
|
$outputDocument = new \OutputDocument();
|
|
|
|
|
$outputDocumentObj = $outputDocument->load($aRow['OUT_DOC_UID']);
|
|
|
|
|
$aRow['OUT_DOC_TITLE'] = $outputDocumentObj['OUT_DOC_TITLE'];
|
|
|
|
|
$aRow['OUT_DOC_DESCRIPTION'] = $outputDocumentObj['OUT_DOC_DESCRIPTION'];
|
|
|
|
|
} else {
|
|
|
|
|
$outputDocArray = array('out_doc_uid' => $aRow['OUT_DOC_UID'],
|
|
|
|
|
'out_doc_title' => $aRow['OUT_DOC_TITLE'],
|
|
|
|
|
'out_doc_description' => $aRow['OUT_DOC_DESCRIPTION'],
|
|
|
|
|
'out_doc_filename' => $aRow['OUT_DOC_FILENAME'],
|
|
|
|
|
'out_doc_template' => $aRow['OUT_DOC_TEMPLATE'],
|
|
|
|
|
'out_doc_report_generator' => $aRow['OUT_DOC_REPORT_GENERATOR'],
|
|
|
|
|
'out_doc_landscape' => $aRow['OUT_DOC_LANDSCAPE'],
|
|
|
|
|
'out_doc_media' => $aRow['OUT_DOC_MEDIA'],
|
|
|
|
|
'out_doc_left_margin' => $aRow['OUT_DOC_LEFT_MARGIN'],
|
|
|
|
|
'out_doc_right_margin' => $aRow['OUT_DOC_RIGHT_MARGIN'],
|
|
|
|
|
'out_doc_top_margin' => $aRow['OUT_DOC_TOP_MARGIN'],
|
|
|
|
|
'out_doc_bottom_margin' => $aRow['OUT_DOC_BOTTOM_MARGIN'],
|
|
|
|
|
'out_doc_generate' => $aRow['OUT_DOC_GENERATE'],
|
|
|
|
|
'out_doc_type' => $aRow['OUT_DOC_TYPE'],
|
|
|
|
|
'out_doc_current_revision' => $aRow['OUT_DOC_CURRENT_REVISION'],
|
|
|
|
|
'out_doc_field_mapping' => $aRow['OUT_DOC_FIELD_MAPPING'],
|
|
|
|
|
'out_doc_versioning' => $aRow['OUT_DOC_VERSIONING'],
|
|
|
|
|
'out_doc_destination_path' => $aRow['OUT_DOC_DESTINATION_PATH'],
|
|
|
|
|
'out_doc_tags' => $aRow['OUT_DOC_TAGS'],
|
|
|
|
|
'out_doc_pdf_security_enabled' => $aRow['OUT_DOC_PDF_SECURITY_ENABLED'],
|
|
|
|
|
'out_doc_pdf_security_permissions' => $aRow['OUT_DOC_PDF_SECURITY_PERMISSIONS'],
|
|
|
|
|
"out_doc_open_type" => $aRow["OUT_DOC_OPEN_TYPE"]);
|
|
|
|
|
$result = [];
|
|
|
|
|
$outputDocuments = ModelOutputDocument::select()
|
|
|
|
|
->where('PRO_UID', '=', $proUid)
|
|
|
|
|
->where('OUT_DOC_UID', '=', $outDocUid)
|
|
|
|
|
->get();
|
|
|
|
|
foreach ($outputDocuments as $value) {
|
|
|
|
|
if (!empty($value->OUT_DOC_TITLE)) {
|
|
|
|
|
$result = [
|
|
|
|
|
'out_doc_uid' => $value->OUT_DOC_UID,
|
|
|
|
|
'out_doc_title' => $value->OUT_DOC_TITLE,
|
|
|
|
|
'out_doc_description' => $value->OUT_DOC_DESCRIPTION,
|
|
|
|
|
'out_doc_filename' => $value->OUT_DOC_FILENAME,
|
|
|
|
|
'out_doc_template' => $value->OUT_DOC_TEMPLATE,
|
|
|
|
|
'out_doc_report_generator' => $value->OUT_DOC_REPORT_GENERATOR,
|
|
|
|
|
'out_doc_landscape' => $value->OUT_DOC_LANDSCAPE,
|
|
|
|
|
'out_doc_media' => $value->OUT_DOC_MEDIA,
|
|
|
|
|
'out_doc_left_margin' => $value->OUT_DOC_LEFT_MARGIN,
|
|
|
|
|
'out_doc_right_margin' => $value->OUT_DOC_RIGHT_MARGIN,
|
|
|
|
|
'out_doc_top_margin' => $value->OUT_DOC_TOP_MARGIN,
|
|
|
|
|
'out_doc_bottom_margin' => $value->OUT_DOC_BOTTOM_MARGIN,
|
|
|
|
|
'out_doc_generate' => $value->OUT_DOC_GENERATE,
|
|
|
|
|
'out_doc_type' => $value->OUT_DOC_TYPE,
|
|
|
|
|
'out_doc_current_revision' => $value->OUT_DOC_CURRENT_REVISION,
|
|
|
|
|
'out_doc_field_mapping' => $value->OUT_DOC_FIELD_MAPPING,
|
|
|
|
|
'out_doc_versioning' => $value->OUT_DOC_VERSIONING,
|
|
|
|
|
'out_doc_destination_path' => $value->OUT_DOC_DESTINATION_PATH,
|
|
|
|
|
'out_doc_tags' => $value->OUT_DOC_TAGS,
|
|
|
|
|
'out_doc_pdf_security_enabled' => $value->OUT_DOC_PDF_SECURITY_ENABLED,
|
|
|
|
|
'out_doc_pdf_security_permissions' => $value->OUT_DOC_PDF_SECURITY_PERMISSIONS,
|
|
|
|
|
'out_doc_open_type' => $value->OUT_DOC_OPEN_TYPE,
|
|
|
|
|
'out_doc_header' => json_decode($value->OUT_DOC_HEADER),
|
|
|
|
|
'out_doc_footer' => json_decode($value->OUT_DOC_FOOTER)
|
|
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
$oDataset->next();
|
|
|
|
|
}
|
|
|
|
|
return $outputDocArray;
|
|
|
|
|
return $result;
|
|
|
|
|
} catch (Exception $e) {
|
|
|
|
|
throw $e;
|
|
|
|
|
}
|
|
|
|
|
@@ -181,6 +119,19 @@ class OutputDocument
|
|
|
|
|
*/
|
|
|
|
|
public function addOutputDocument($sProcessUID, $outputDocumentData)
|
|
|
|
|
{
|
|
|
|
|
if (empty($outputDocumentData['out_doc_header'])) {
|
|
|
|
|
$outputDocumentData['out_doc_header'] = [];
|
|
|
|
|
}
|
|
|
|
|
if (isset($outputDocumentData['out_doc_header'])) {
|
|
|
|
|
$outputDocumentData['out_doc_header'] = json_encode($outputDocumentData['out_doc_header']);
|
|
|
|
|
}
|
|
|
|
|
if (empty($outputDocumentData['out_doc_footer'])) {
|
|
|
|
|
$outputDocumentData['out_doc_footer'] = [];
|
|
|
|
|
}
|
|
|
|
|
if (isset($outputDocumentData['out_doc_footer'])) {
|
|
|
|
|
$outputDocumentData['out_doc_footer'] = json_encode($outputDocumentData['out_doc_footer']);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$pemission = $outputDocumentData['out_doc_pdf_security_permissions'];
|
|
|
|
|
$pemission = explode("|", $pemission);
|
|
|
|
|
foreach ($pemission as $row) {
|
|
|
|
|
@@ -244,6 +195,19 @@ class OutputDocument
|
|
|
|
|
*/
|
|
|
|
|
public function updateOutputDocument($sProcessUID, $outputDocumentData, $sFlag, $sOutputDocumentUID = '')
|
|
|
|
|
{
|
|
|
|
|
if (empty($outputDocumentData['out_doc_header'])) {
|
|
|
|
|
$outputDocumentData['out_doc_header'] = [];
|
|
|
|
|
}
|
|
|
|
|
if (isset($outputDocumentData['out_doc_header'])) {
|
|
|
|
|
$outputDocumentData['out_doc_header'] = json_encode($outputDocumentData['out_doc_header']);
|
|
|
|
|
}
|
|
|
|
|
if (empty($outputDocumentData['out_doc_footer'])) {
|
|
|
|
|
$outputDocumentData['out_doc_footer'] = [];
|
|
|
|
|
}
|
|
|
|
|
if (isset($outputDocumentData['out_doc_footer'])) {
|
|
|
|
|
$outputDocumentData['out_doc_footer'] = json_encode($outputDocumentData['out_doc_footer']);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$oConnection = \Propel::getConnection(\OutputDocumentPeer::DATABASE_NAME);
|
|
|
|
|
$pemission = $outputDocumentData['out_doc_pdf_security_permissions'];
|
|
|
|
|
$pemission = explode("|", $pemission);
|
|
|
|
|
|