本文整理汇总了PHP中t3lib_div::devlog方法的典型用法代码示例。如果您正苦于以下问题:PHP t3lib_div::devlog方法的具体用法?PHP t3lib_div::devlog怎么用?PHP t3lib_div::devlog使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类t3lib_div
的用法示例。
在下文中一共展示了t3lib_div::devlog方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: initLang
/**
* Inits the class 'language'
*
* @param string Fieldname in the _LOCAL_LANG array or the locallang.xml
* @return void
*/
public function initLang()
{
require_once PATH_typo3 . 'sysext/lang/lang.php';
$this->pObj->lang = t3lib_div::makeInstance('language');
$this->pObj->lang->init($GLOBALS['TSFE']->lang);
if ($this->pObj->b_drs_all) {
t3lib_div::devlog('[INFO/ALL] Init a language object.', $this->pObj->extKey, 0);
t3lib_div::devlog('[INFO/ALL] Value of $GLOBALS[TSFE]->lang :' . $GLOBALS['TSFE']->lang, $this->pObj->extKey, 0);
}
}
示例2: validateMapping
/**
* cover all cases:
* 1. extend TYPO3 class like fe_users (no mapping table needed)
*
* @param Tx_ExtensionBuilder_Domain_Model_DomainObject $domainObject
*/
private function validateMapping(Tx_ExtensionBuilder_Domain_Model_DomainObject $domainObject)
{
$parentClass = $domainObject->getParentClass();
$tableName = $domainObject->getMapToTable();
$extensionPrefix = 'Tx_' . t3lib_div::underscoredToUpperCamelCase($domainObject->getExtension()->getExtensionKey()) . '_Domain_Model_';
if (!empty($parentClass)) {
$classConfiguration = $this->configurationManager->getExtbaseClassConfiguration($parentClass);
t3lib_div::devlog('class settings ' . $parentClass, 'extension_builder', 0, $classConfiguration);
if (!isset($classConfiguration['tableName'])) {
if (!$tableName) {
$this->validationResult['errors'][] = new Tx_ExtensionBuilder_Domain_Exception_ExtensionException('Mapping configuration error in domain object ' . $domainObject->getName() . ': The mapping table could not be detected from Extbase Configuration. Please enter a table name', self::ERROR_MAPPING_NO_TABLE);
}
} else {
// get the table name from the parent class configuration
$tableName = $classConfiguration['tableName'];
}
if (!class_exists($parentClass, TRUE)) {
$this->validationResult['errors'][] = new Tx_ExtensionBuilder_Domain_Exception_ExtensionException('Mapping configuration error in domain object ' . $domainObject->getName() . ': the parent class ' . $parentClass . 'seems not to exist ', self::ERROR_MAPPING_NO_PARENTCLASS);
}
}
if ($tableName) {
if (strpos($extensionPrefix, $tableName) !== FALSE) {
// the domainObject extends a class of the same extension
if (!$parentClass) {
$this->validationResult['errors'][] = new Tx_ExtensionBuilder_Domain_Exception_ExtensionException('Mapping configuration error in domain object ' . $domainObject->getName() . ': you have to define a parent class if you map to a table of another domain object of the same extension ', self::ERROR_MAPPING_NO_PARENTCLASS);
}
}
if (!isset($GLOBALS['TCA'][$tableName])) {
$this->validationResult['errors'][] = new Tx_ExtensionBuilder_Domain_Exception_ExtensionException('There is no entry for table "' . $tableName . '" of ' . $domainObject->getName() . ' in TCA. For technical reasons you can only extend tables with TCA configuration.', self::ERROR_MAPPING_NO_TCA);
}
}
if (isset($GLOBALS['TCA'][$tableName]['ctrl']['type'])) {
$dataTypeRes = $GLOBALS['TYPO3_DB']->sql_query('DESCRIBE ' . $tableName);
while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($dataTypeRes)) {
if ($row['Field'] == $GLOBALS['TCA'][$tableName]['ctrl']['type']) {
if (strpos($row['Type'], 'int') !== FALSE) {
$this->validationResult['warnings'][] = new Tx_ExtensionBuilder_Domain_Exception_ExtensionException('The configured type field for table "' . $tableName . '" is of type ' . $row['Type'] . '<br />This means the type field can not be used for defining the record type. <br />You have to configure the mappings yourself if you want to map to this<br /> table or extend the correlated class', self::ERROR_MAPPING_WRONG_TYPEFIELD_CONFIGURATION);
}
}
}
}
}
示例3: sendEmail
public function sendEmail($from, $to, $subject, $bodyHtml, $bodyPlain = '')
{
$mail = t3lib_div::makeInstance('t3lib_mail_Message');
if (empty($bodyPlain)) {
$bodyPlain = preg_replace('/(<br>|<br \\/>|<br\\/>)\\s*/i', PHP_EOL, $bodyHtml);
$bodyPlain = strip_tags($this->bodyPlain);
}
$mail->setFrom($from);
$mail->setTo($to);
$mail->setSubject($subject);
$htmlComplete = $this->initHtml() . $bodyHtml . $this->exitHtml();
$mail->setBody($htmlComplete, 'text/html');
$mail->addPart($bodyPlain, 'text/plain');
$erg = $mail->send();
if (!$erg) {
$failedRecipients = $this->mail->getFailedRecipients();
t3lib_div::devlog('E-Mail-Versand fehlgeschlagen!', 'kms_formular', 0, $failedRecipients);
}
return $erg;
}
示例4: prompt_drs
/**
* prompt_drs(): Prompt to the drs the value if the given sheet.field
*
* @param string $sheet: label of the sheet
* @param string $field: label of the field
* @param string $value: value of the field
* @return void
* @version 0.0.1
* @since 0.0.1
*/
public function prompt_drs($sheet, $field, $value)
{
if ($this->pObj->b_drs_flexform) {
t3lib_div::devlog('[INFO/FLEXFORM] ' . $sheet . '.' . $field . ': \'' . $value . '\'', $this->pObj->extKey, 0);
}
}
示例5: buildRelation
/**
*
* @param $relationJsonConfiguration
* @return Tx_ExtensionBuilder_Domain_Model_DomainObject_Relation_AbstractRelation
*/
public static function buildRelation($relationJsonConfiguration)
{
$relationSchemaClassName = 'Tx_ExtensionBuilder_Domain_Model_DomainObject_Relation_' . ucfirst($relationJsonConfiguration['relationType']) . 'Relation';
if (!class_exists($relationSchemaClassName)) {
t3lib_div::devlog('Relation misconfiguration', 'extension_builder', 2, $relationJsonConfiguration);
throw new Exception('Relation of type ' . $relationSchemaClassName . ' not found (configured in "' . $relationJsonConfiguration['relationName'] . '")');
}
$relation = new $relationSchemaClassName();
$relation->setName($relationJsonConfiguration['relationName']);
//$relation->setInlineEditing((bool)$relationJsonConfiguration['inlineEditing']);
$relation->setLazyLoading((bool) $relationJsonConfiguration['lazyLoading']);
$relation->setExcludeField($relationJsonConfiguration['propertyIsExcludeField']);
$relation->setDescription($relationJsonConfiguration['relationDescription']);
$relation->setUniqueIdentifier($relationJsonConfiguration['uid']);
return $relation;
}
示例6: mergeLocallangXlf
/**
* merge existing locallang (either in xlf or locallang.xml) with the required/configured new labels
*
* TODO: this method works currently only for 'default' language
* @static
* @param string $locallangFile
* @param string $newXmlString
* @param string fileFormat (xml or xlf
* @return string merged label in XML format
*/
public static function mergeLocallangXlf($locallangFile, $newXmlString, $fileFormat)
{
if (!file_exists($locallangFile)) {
throw new Exception('File not found: ' . $locallangFile);
}
if (pathinfo($locallangFile, PATHINFO_EXTENSION) == 'xlf') {
$existingXml = simplexml_load_file($locallangFile, 'SimpleXmlElement', LIBXML_NOWARNING);
$existingLabelArr = self::flattenLocallangArray(self::parseXliff($existingXml), 'xlf');
} else {
$existingLabelArr = self::flattenLocallangArray(t3lib_div::xml2array(t3lib_div::getUrl($locallangFile)), 'xml');
}
if ($fileFormat == 'xlf') {
$newXml = simplexml_load_string($newXmlString, 'SimpleXmlElement', LIBXML_NOWARNING);
$newLabelArr = self::flattenLocallangArray(self::parseXliff($newXml), 'xlf');
} else {
$newLabelArr = self::flattenLocallangArray(t3lib_div::xml2array($newXmlString), 'xml');
}
t3lib_div::devlog('mergeLocallang', 'extension_builder', 0, array('new' => $newLabelArr, 'existing' => $existingLabelArr));
if (is_array($existingLabelArr)) {
$mergedLabelArr = t3lib_div::array_merge_recursive_overrule($newLabelArr, $existingLabelArr);
} else {
$mergedLabelArr = $newLabelArr;
}
t3lib_div::devlog('mergeLocallang', 'extension_builder', 0, $mergedLabelArr);
return $mergedLabelArr;
}
示例7: getExtensionSettings
/**
*
* @param string $extensionKey
* @return array settings
*/
public function getExtensionSettings($extensionKey)
{
$settings = array();
$settingsFile = $this->getSettingsFile($extensionKey);
if (file_exists($settingsFile)) {
$yamlParser = new Tx_ExtensionBuilder_Utility_SpycYAMLParser();
$settings = $yamlParser->YAMLLoadString(file_get_contents($settingsFile));
} else {
t3lib_div::devlog('No settings found: ' . $settingsFile, 'extension_builder', 2);
}
return $settings;
}
示例8: backupExtension
/**
*
* @param Tx_ExtensionBuilder_Domain_Model_Extension $extension
* @param string $backupDir
*
* @return void
*/
static function backupExtension($extension, $backupDir)
{
if (empty($backupDir)) {
throw new Exception('Please define a backup directory in extension configuration!');
} else {
if (!t3lib_div::validPathStr($backupDir)) {
throw new Exception('Backup directory is not a valid path: ' . $backupDir);
} else {
if (t3lib_div::isAbsPath($backupDir)) {
if (!t3lib_div::isAllowedAbsPath($backupDir)) {
throw new Exception('Backup directory is not an allowed absolute path: ' . $backupDir);
}
} else {
$backupDir = PATH_site . $backupDir;
}
}
}
if (strrpos($backupDir, '/') < strlen($backupDir) - 1) {
$backupDir .= '/';
}
if (!is_dir($backupDir)) {
throw new Exception('Backup directory does not exist: ' . $backupDir);
} else {
if (!is_writable($backupDir)) {
throw new Exception('Backup directory is not writable: ' . $backupDir);
}
}
$backupDir .= $extension->getExtensionKey();
// create a subdirectory for this extension
if (!is_dir($backupDir)) {
t3lib_div::mkdir($backupDir);
}
if (strrpos($backupDir, '/') < strlen($backupDir) - 1) {
$backupDir .= '/';
}
$backupDir .= date('Y-m-d-') . time();
if (!is_dir($backupDir)) {
t3lib_div::mkdir($backupDir);
}
$extensionDir = substr($extension->getExtensionDir(), 0, strlen($extension->getExtensionDir()) - 1);
try {
self::recurse_copy($extensionDir, $backupDir);
} catch (Exception $e) {
throw new Exception('Code generation aborted:' . $e->getMessage());
}
t3lib_div::devlog('Backup created in ' . $backupDir, 'extension_builder', 0);
}
示例9: writeFile
/**
* wrapper for t3lib_div::writeFile
* checks for overwrite settings
*
* @param string $targetFile the path and filename of the targetFile (relative to extension dir)
* @param string $fileContents
*/
protected function writeFile($targetFile, $fileContents)
{
if ($this->roundTripEnabled) {
$overWriteMode = Tx_ExtensionBuilder_Service_RoundTrip::getOverWriteSettingForPath($targetFile, $this->extension);
if ($overWriteMode == -1) {
return;
// skip file creation
}
if ($overWriteMode == 1 && strpos($targetFile, 'Classes') === FALSE) {
// classes are merged by the class builder
$fileExtension = strtolower(pathinfo($targetFile, PATHINFO_EXTENSION));
if ($fileExtension == 'html') {
//TODO: We need some kind of protocol to be displayed after code generation
t3lib_div::devlog('File ' . basename($targetFile) . ' was not written. Template files can\'t be merged!', 'extension_builder', 1);
return;
} elseif (in_array($fileExtension, $this->filesSupportingSplitToken)) {
$fileContents = $this->insertSplitToken($targetFile, $fileContents);
}
} else {
if (file_exists($targetFile) && $overWriteMode == 2) {
// keep the existing file
return;
}
}
}
if (empty($fileContents)) {
t3lib_div::devLog('No file content! File ' . $targetFile . ' had no content', 'extension_builder', 0, $this->settings);
}
$success = t3lib_div::writeFile($targetFile, $fileContents);
if (!$success) {
throw new Exception('File ' . $targetFile . ' could not be created!');
}
}
示例10: setExtensionProperties
/**
* @param Tx_ExtensionBuilder_Domain_Model_Extension $extension
* @param array $propertyConfiguration
* @return void
*/
protected function setExtensionProperties(&$extension, $propertyConfiguration)
{
// name
$extension->setName(trim($propertyConfiguration['name']));
// description
$extension->setDescription($propertyConfiguration['description']);
// extensionKey
$extension->setExtensionKey(trim($propertyConfiguration['extensionKey']));
if ($propertyConfiguration['emConf']['disableVersioning']) {
$extension->setSupportVersioning(FALSE);
}
// various extension properties
$extension->setVersion($propertyConfiguration['emConf']['version']);
if (!empty($propertyConfiguration['emConf']['dependsOn'])) {
$dependencies = array();
$lines = t3lib_div::trimExplode("\n", $propertyConfiguration['emConf']['dependsOn']);
foreach ($lines as $line) {
if (strpos($line, '=>')) {
list($extensionKey, $version) = t3lib_div::trimExplode('=>', $line);
$dependencies[$extensionKey] = $version;
}
}
$extension->setDependencies($dependencies);
}
if (!empty($propertyConfiguration['emConf']['targetVersion'])) {
$extension->setTargetVersion(floatval($propertyConfiguration['emConf']['targetVersion']));
}
if (!empty($propertyConfiguration['emConf']['custom_category'])) {
$category = $propertyConfiguration['emConf']['custom_category'];
} else {
$category = $propertyConfiguration['emConf']['category'];
}
$extension->setCategory($category);
$extension->setShy($propertyConfiguration['emConf']['shy']);
$extension->setPriority($propertyConfiguration['emConf']['priority']);
// state
$state = 0;
switch ($propertyConfiguration['emConf']['state']) {
case 'alpha':
$state = Tx_ExtensionBuilder_Domain_Model_Extension::STATE_ALPHA;
break;
case 'beta':
$state = Tx_ExtensionBuilder_Domain_Model_Extension::STATE_BETA;
break;
case 'stable':
$state = Tx_ExtensionBuilder_Domain_Model_Extension::STATE_STABLE;
break;
case 'experimental':
$state = Tx_ExtensionBuilder_Domain_Model_Extension::STATE_EXPERIMENTAL;
break;
case 'test':
$state = Tx_ExtensionBuilder_Domain_Model_Extension::STATE_TEST;
break;
}
$extension->setState($state);
if (!empty($propertyConfiguration['originalExtensionKey'])) {
// handle renaming of extensions
// original extensionKey
$extension->setOriginalExtensionKey($propertyConfiguration['originalExtensionKey']);
t3lib_div::devlog('Extension setOriginalExtensionKey:' . $extension->getOriginalExtensionKey(), 'extbase', 0, $propertyConfiguration);
}
if (!empty($propertyConfiguration['originalExtensionKey']) && $extension->getOriginalExtensionKey() != $extension->getExtensionKey()) {
$settings = $this->configurationManager->getExtensionSettings($extension->getOriginalExtensionKey());
// if an extension was renamed, a new extension dir is created and we
// have to copy the old settings file to the new extension dir
copy($this->configurationManager->getSettingsFile($extension->getOriginalExtensionKey()), $this->configurationManager->getSettingsFile($extension->getExtensionKey()));
} else {
$settings = $this->configurationManager->getExtensionSettings($extension->getExtensionKey());
}
if (!empty($settings)) {
$extension->setSettings($settings);
t3lib_div::devlog('Extension settings:' . $extension->getExtensionKey(), 'extbase', 0, $extension->getSettings());
}
}
示例11: rpcAction_save
/**
* Generate the code files according to the transferred JSON configuration
*
* @throws Exception
* @return array (status => message)
*/
protected function rpcAction_save()
{
try {
$extensionBuildConfiguration = $this->configurationManager->getConfigurationFromModeler();
t3lib_div::devlog('Modeler Configuration', 'extension_builder', 0, $extensionBuildConfiguration);
$validationConfigurationResult = $this->extensionValidator->validateConfigurationFormat($extensionBuildConfiguration);
if (!empty($validationConfigurationResult['warnings'])) {
$confirmationRequired = $this->handleValidationWarnings($validationConfigurationResult['warnings']);
if (!empty($confirmationRequired)) {
return $confirmationRequired;
}
}
$extension = $this->extensionSchemaBuilder->build($extensionBuildConfiguration);
} catch (Exception $e) {
throw $e;
}
// Validate the extension
$validationResult = $this->extensionValidator->isValid($extension);
if (!empty($validationResult['errors'])) {
$errorMessage = '';
foreach ($validationResult['errors'] as $exception) {
$errorMessage .= '<br />' . $exception->getMessage();
}
throw new Exception($errorMessage);
}
if (!empty($validationResult['warnings'])) {
$confirmationRequired = $this->handleValidationWarnings($validationResult['warnings']);
if (!empty($confirmationRequired)) {
return $confirmationRequired;
}
}
$extensionDirectory = $extension->getExtensionDir();
if (!is_dir($extensionDirectory)) {
t3lib_div::mkdir($extensionDirectory);
} else {
if ($this->settings['extConf']['backupExtension'] == 1) {
try {
Tx_ExtensionBuilder_Service_RoundTrip::backupExtension($extension, $this->settings['extConf']['backupDir']);
} catch (Exception $e) {
throw $e;
}
}
$extensionSettings = $this->configurationManager->getExtensionSettings($extension->getExtensionKey());
if ($this->settings['extConf']['enableRoundtrip'] == 1) {
if (empty($extensionSettings)) {
// no config file in an existing extension!
// this would result in a total overwrite so we create one and give a warning
$this->configurationManager->createInitialSettingsFile($extension, $this->settings['codeTemplateRootPath']);
return array('warning' => "<span class='error'>Roundtrip is enabled but no configuration file was found.</span><br />This might happen if you use the extension builder the first time for this extension. <br />A settings file was generated in <br /><b>typo3conf/ext/" . $extension->getExtensionKey() . "/Configuration/ExtensionBuilder/settings.yaml.</b><br />Configure the overwrite settings, then save again.");
}
try {
Tx_ExtensionBuilder_Service_RoundTrip::prepareExtensionForRoundtrip($extension);
} catch (Exception $e) {
throw $e;
}
}
}
try {
$this->codeGenerator->build($extension);
$this->extensionInstallationStatus->setExtension($extension);
$message = '<p>The Extension was saved</p>' . $this->extensionInstallationStatus->getStatusMessage();
if ($extension->getNeedsUploadFolder()) {
$message .= '<br />Notice: File upload is not yet implemented.';
}
$result = array('success' => $message);
} catch (Exception $e) {
throw $e;
}
$this->extensionRepository->saveExtensionConfiguration($extension);
return $result;
}
示例12: writeModelClassWithZeroToOneRelation
/**
* Write a simple model class for a non aggregate root domain object with one to one relation
*
* @test
*/
function writeModelClassWithZeroToOneRelation()
{
$modelName = 'ModelCgt3';
$relatedModelName = 'relatedModel';
$propertyName = 'relName';
$domainObject = $this->buildDomainObject($modelName);
$relatedDomainObject = $this->buildDomainObject($relatedModelName);
$relation = new Tx_ExtensionBuilder_Domain_Model_DomainObject_Relation_ZeroToOneRelation($propertyName);
$relation->setForeignModel($relatedDomainObject);
$domainObject->addProperty($relation);
$classFileContent = $this->codeGenerator->generateDomainObjectCode($domainObject, TRUE);
$modelClassDir = 'Classes/Domain/Model/';
$result = t3lib_div::mkdir_deep($this->extension->getExtensionDir(), $modelClassDir);
$absModelClassDir = $this->extension->getExtensionDir() . $modelClassDir;
$this->assertTrue(is_dir($absModelClassDir), 'Directory ' . $absModelClassDir . ' was not created');
$modelClassPath = $absModelClassDir . $domainObject->getName() . '.php';
t3lib_div::devlog('Class Content', 'extension_builder', 0, array('c' => $classFileContent));
t3lib_div::writeFile($modelClassPath, $classFileContent);
$this->assertFileExists($modelClassPath, 'File was not generated: ' . $modelClassPath);
$className = $domainObject->getClassName();
include $modelClassPath;
$this->assertTrue(class_exists($className), 'Class was not generated:' . $className);
$reflection = new Tx_ExtensionBuilder_Reflection_ClassReflection($className);
$this->assertTrue($reflection->hasMethod('get' . ucfirst($propertyName)), 'Getter was not generated');
$this->assertTrue($reflection->hasMethod('set' . ucfirst($propertyName)), 'Setter was not generated');
$setterMethod = $reflection->getMethod('set' . ucfirst($propertyName));
$this->assertTrue($setterMethod->isTaggedWith('param'), 'No param tag set for setter method');
$paramTagValues = $setterMethod->getTagValues('param');
$this->assertTrue(strpos($paramTagValues[0], $relatedDomainObject->getClassName()) === 0, 'Wrong param tag:' . $paramTagValues[0]);
$parameters = $setterMethod->getParameters();
$this->assertTrue(count($parameters) == 1, 'Wrong parameter count in setter method');
$parameter = current($parameters);
$this->assertTrue($parameter->getName() == $propertyName, 'Wrong parameter name in setter method');
$this->assertTrue($parameter->getTypeHint() == $relatedDomainObject->getClassName(), 'Wrong type hint for setter parameter:' . $parameter->getTypeHint());
}
示例13: renderTemplate
/**
*
* @param string $filePath
* @param Array $variables
*/
protected function renderTemplate($filePath, $variables)
{
if (!isset($variables['settings']['codeTemplateRootPath'])) {
t3lib_div::devlog('Render: ' . $filePath, 'builder', 2, $variables);
throw new Exception('No template root path configured: ' . $filePath);
}
if (!file_exists($variables['settings']['codeTemplateRootPath'] . $filePath)) {
t3lib_div::devlog('No template file found: ' . $variables['settings']['codeTemplateRootPath'] . $filePath, 'extension_builder', 2, $variables);
throw new Exception('No template file found: ' . $variables['settings']['codeTemplateRootPath'] . $filePath);
}
$parsedTemplate = $this->templateParser->parse(file_get_contents($variables['settings']['codeTemplateRootPath'] . $filePath));
return $parsedTemplate->render($this->buildRenderingContext($variables));
}
示例14: sendeBuchungsUeberblick
public function sendeBuchungsUeberblick($anrede, $email)
{
$mail = t3lib_div::makeInstance('t3lib_mail_Message');
$sender = $this->conf['veranstaltungen.']['email.']['sender'];
$subject = $this->conf['veranstaltungen.']['email.']['subject'];
$footer = $this->conf['veranstaltungen.']['email.']['footer.']['value'];
$titleVeranstaltung = $this->conf['veranstaltungen.']['veranstaltungs_titel'];
$username = $GLOBALS['TSFE']->fe_user->user['username'];
$userTermine = $this->userTermine($username);
$bodyHtml = '<p>' . $anrede . '</p>';
if (count($userTermine) == 0) {
$bodyHtml .= '<p>Aktuell sind keine Veranstaltungen für Sie gebucht</p>';
} else {
$bodyHtml .= '<p>Aktuell sind folgende Veranstaltungen für Sie gebucht:</p>
<table>
';
foreach ($userTermine as $termin) {
$this->gibTerminDetails($termin, $titel, $ort, $raum, $datum, $uhrzeit);
$bodyHtml .= '<tr class="title"><th colspan="2">' . $titleVeranstaltung . ': ' . $titel . '</th></tr>
<tr><td class="right">Datum:</td><td>' . $datum . '</td></tr>
<tr><td class="right">Zeit:</td><td>' . $uhrzeit . '</td></tr>
<tr><td class="right">Ort:</td><td>' . $ort . '</td></tr>
<tr><td class="right">Raum:</td><td>' . $raum . '</td></tr>
';
}
$bodyHtml .= '</table>
';
}
$bodyHtml .= '<p>' . $footer . '</p>';
$bodyPlain = strip_tags($bodyHtml);
$mail->setFrom($sender);
$mail->setTo($email);
$mail->setSubject($subject);
$htmlComplete = $this->initHtml($subject) . $bodyHtml . $this->exitHtml();
$mail->setBody($htmlComplete, 'text/html');
$mail->addPart($bodyPlain, 'text/plain');
$erg = $mail->send();
if (!$erg) {
$failedRecipients = $mail->getFailedRecipients();
t3lib_div::devlog('E-Mail-Versand fehlgeschlagen!', 'fe_managment', 0, $failedRecipients);
}
return $erg;
}
示例15: generateRepositoryClassObject
/**
* This method generates the repository class object, which is passed to the template
* it keeps all methods and properties including user modified method bodies and comments
* needed to create a repository class file
*
* @param Tx_ExtensionBuilder_Domain_Model_DomainObject $domainObject
* @param boolean $mergeWithExistingClass
*
* @return Tx_ExtensionBuilder_Domain_Model_Class_Class
*/
public function generateRepositoryClassObject($domainObject, $mergeWithExistingClass)
{
t3lib_div::devlog('------------------------------------- generateRepositoryClassObject(' . $domainObject->getName() . ') ---------------------------------', 'extension_builder', 1);
$this->classObject = NULL;
$className = $domainObject->getDomainRepositoryClassName();
if ($mergeWithExistingClass) {
try {
$this->classObject = $this->roundTripService->getRepositoryClass($domainObject);
} catch (Exception $e) {
t3lib_div::devLog('Class ' . $className . ' could not be imported: ' . $e->getMessage(), 'extension_builder');
}
}
if ($this->classObject == NULL) {
$this->classObject = new Tx_ExtensionBuilder_Domain_Model_Class_Class($className);
if (isset($this->settings['Repository']['parentClass'])) {
$parentClass = $this->settings['Repository']['parentClass'];
} else {
$parentClass = 'Tx_Extbase_Persistence_Repository';
}
$this->classObject->setParentClass($parentClass);
}
return $this->classObject;
}