コード例 #1
0
 /**
  * Create new CjwNewsletterEditionSend object
  *
  * @param CjwNewsletterEdition $editionObject
  * @return object
  */
 static function create(CjwNewsletterEdition $editionObject)
 {
     $editionContentObjectId = $editionObject->attribute('contentobject_id');
     $editionContentObjectVersion = $editionObject->attribute('contentobject_attribute_version');
     $user = eZUser::currentUser();
     $creatorId = $user->attribute('contentobject_id');
     // $outputXml = '<xml>hali hallo</xml>';
     $outputXml = $editionObject->createOutputXml();
     $listAttributeContent = $editionObject->attribute('list_attribute_content');
     $listContentObjectId = $listAttributeContent->attribute('contentobject_id');
     $outputFormatArrayString = $listAttributeContent->attribute('output_format_array_string');
     $mainSiteAccess = $listAttributeContent->attribute('main_siteaccess');
     $emailSender = $listAttributeContent->attribute('email_sender');
     $emailSenderName = $listAttributeContent->attribute('email_sender_name');
     $personalizeContent = $listAttributeContent->attribute('personalize_content');
     $rows = array('list_contentobject_id' => $listContentObjectId, 'edition_contentobject_id' => $editionContentObjectId, 'edition_contentobject_version' => $editionContentObjectVersion, 'siteaccess' => $mainSiteAccess, 'output_format_array_string' => $outputFormatArrayString, 'created' => time(), 'creator_id' => $creatorId, 'status' => CjwNewsletterEditionSend::STATUS_WAIT_FOR_PROCESS, 'output_xml' => $outputXml, 'hash' => CjwNewsletterUtils::generateUniqueMd5Hash($listContentObjectId . $editionContentObjectId . $editionContentObjectVersion), 'email_sender' => $emailSender, 'email_sender_name' => $emailSenderName, 'personalize_content' => $personalizeContent);
     $object = new CjwNewsletterEditionSend($rows);
     return $object;
 }
コード例 #2
0
 /**
  * Create new CjwNewsletterEditionSend object
  *
  * @param CjwNewsletterEdition $editionObject
  * @return object
  */
 static function create(CjwNewsletterEdition $editionObject, $schedule = null)
 {
     $editionContentObjectId = $editionObject->attribute('contentobject_id');
     $editionContentObjectVersion = $editionObject->attribute('contentobject_attribute_version');
     $user = eZUser::currentUser();
     $creatorId = $user->attribute('contentobject_id');
     // $outputXml = '<xml>hali hallo</xml>';
     $outputXml = $editionObject->createOutputXml();
     $listAttributeContent = $editionObject->attribute('list_attribute_content');
     $listContentObjectId = $listAttributeContent->attribute('contentobject_id');
     $listContentObjectVersion = $listAttributeContent->attribute('contentobject_attribute_version');
     $listIsVirtual = $listAttributeContent->attribute('is_virtual');
     $outputFormatArrayString = $listAttributeContent->attribute('output_format_array_string');
     $mainSiteAccess = $listAttributeContent->attribute('main_siteaccess');
     $emailSender = $listAttributeContent->attribute('email_sender');
     $emailSenderName = $listAttributeContent->attribute('email_sender_name');
     $emailReplyTo = $listAttributeContent->attribute('email_reply_to');
     $emailReturnPath = $listAttributeContent->attribute('email_return_path');
     $personalizeContent = $listAttributeContent->attribute('personalize_content');
     $rows = array('list_contentobject_id' => $listContentObjectId, 'list_contentobject_version' => $listContentObjectVersion, 'list_is_virtual' => $listIsVirtual, 'edition_contentobject_id' => $editionContentObjectId, 'edition_contentobject_version' => $editionContentObjectVersion, 'siteaccess' => $mainSiteAccess, 'output_format_array_string' => $outputFormatArrayString, 'created' => time(), 'creator_id' => $creatorId, 'status' => CjwNewsletterEditionSend::STATUS_WAIT_FOR_SCHEDULE, 'mailqueue_process_scheduled' => is_null($schedule) ? time() : $schedule, 'output_xml' => $outputXml, 'hash' => CjwNewsletterUtils::generateUniqueMd5Hash($listContentObjectId . $editionContentObjectId . $editionContentObjectVersion), 'email_sender' => $emailSender, 'email_sender_name' => $emailSenderName, 'email_reply_to' => $emailReplyTo, 'email_return_path' => $emailReturnPath, 'personalize_content' => $personalizeContent);
     $object = new CjwNewsletterEditionSend($rows);
     return $object;
 }