Skip to content

Commit

Permalink
[TASK] PSR2 update2
Browse files Browse the repository at this point in the history
  • Loading branch information
einpraegsam committed Jun 18, 2016
1 parent ae67d25 commit dd1e00b
Show file tree
Hide file tree
Showing 5 changed files with 77 additions and 78 deletions.
5 changes: 2 additions & 3 deletions Classes/Domain/Service/SendMailService.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?php
namespace In2code\Powermailextended\Domain\Service;

use In2code\Powermail\Domain\Model\Mail;
use TYPO3\CMS\Core\Mail\MailMessage;

/**
Expand All @@ -21,9 +20,9 @@ public function manipulateMail($message)
{
// overwrite the receiver
$message->setTo(
array(
[
'anotheremail@domain.org' => 'receiverName'
)
]
);
}
}
6 changes: 3 additions & 3 deletions Classes/Domain/Validator/ZipValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ class ZipValidator
* Check if given number is higher than in configuration
*
* @param string $value
* @param string $validationConfiguration
* @param string $validationConfig
* @return bool
*/
public function validate100($value, $validationConfiguration)
public function validate100($value, $validationConfig)
{
return is_numeric($value) && $value >= $validationConfiguration;
return is_numeric($value) && $value >= $validationConfig;
}
}
65 changes: 33 additions & 32 deletions ext_emconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,35 +10,36 @@
* writing. "version" and "dependencies" must not be touched!
***************************************************************/

$EM_CONF[$_EXTKEY] = array (
'title' => 'powermailextended',
'description' => 'Sample Extension to extend powermail: Add new validators, Add new Fieldtypes or Add new Field Properties',
'category' => 'plugin',
'shy' => 0,
'version' => '3.0.0',
'dependencies' => '',
'conflicts' => '',
'priority' => '',
'loadOrder' => '',
'module' => '',
'state' => 'beta',
'uploadfolder' => 0,
'createDirs' => 'uploads/tx_powermail',
'modify_tables' => '',
'clearcacheonload' => 0,
'lockType' => '',
'author' => 'Powermail dev team',
'author_email' => 'alexander.kellner@in2code.de',
'author_company' => 'in2code.de',
'CGLcompliance' => '',
'CGLcompliance_note' => '',
'constraints' => array(
'depends' => array(
'typo3' => '7.6.0-8.99.99',
'powermail' => '3.0.0-3.99.99',
),
'conflicts' => array(),
'suggests' => array(),
),
'_md5_values_when_last_written' => '',
);
$EM_CONF[$_EXTKEY] = [
'title' => 'powermailextended',
'description' => 'Sample Extension to extend powermail:
Add new validators, Add new Fieldtypes or Add new Field Properties',
'category' => 'plugin',
'shy' => 0,
'version' => '3.0.0',
'dependencies' => '',
'conflicts' => '',
'priority' => '',
'loadOrder' => '',
'module' => '',
'state' => 'beta',
'uploadfolder' => 0,
'createDirs' => 'uploads/tx_powermail',
'modify_tables' => '',
'clearcacheonload' => 0,
'lockType' => '',
'author' => 'Powermail dev team',
'author_email' => 'alexander.kellner@in2code.de',
'author_company' => 'in2code.de',
'CGLcompliance' => '',
'CGLcompliance_note' => '',
'constraints' => [
'depends' => [
'typo3' => '7.6.0-8.99.99',
'powermail' => '3.0.0-3.99.99',
],
'conflicts' => [],
'suggests' => [],
],
'_md5_values_when_last_written' => '',
];
24 changes: 13 additions & 11 deletions ext_localconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,24 @@
* Register some Slots
*/
/** @var \TYPO3\CMS\Extbase\SignalSlot\Dispatcher $signalSlotDispatcher */
$signalSlotDispatcher = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\SignalSlot\Dispatcher');
$signalSlotDispatcher = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
\TYPO3\CMS\Extbase\SignalSlot\Dispatcher::class
);

// Manipulate a value before sending
//$signalSlotDispatcher->connect(
// 'In2code\Powermail\Controller\FormController',
// 'createActionBeforeRenderView',
// 'In2code\Powermailextended\Controller\FormController',
// 'manipulateMailObjectOnCreate',
// FALSE
// 'In2code\Powermail\Controller\FormController',
// 'createActionBeforeRenderView',
// 'In2code\Powermailextended\Controller\FormController',
// 'manipulateMailObjectOnCreate',
// false
//);

// Change receiver mail
//$signalSlotDispatcher->connect(
// 'In2code\Powermail\Domain\Service\SendMailService',
// 'sendTemplateEmailBeforeSend',
// 'In2code\Powermailextended\Domain\Service\SendMailService',
// 'manipulateMail',
// FALSE
// 'In2code\Powermail\Domain\Service\SendMailService',
// 'sendTemplateEmailBeforeSend',
// 'In2code\Powermailextended\Domain\Service\SendMailService',
// 'manipulateMail',
// false
//);
55 changes: 26 additions & 29 deletions ext_tables.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,39 +3,36 @@
* Include Static TypoScript
*/
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile(
$_EXTKEY,
'Configuration/TypoScript',
'Powermail Addition (after Powermail Template)'
$_EXTKEY,
'Configuration/TypoScript',
'Powermail Addition (after Powermail Template)'
);

/**
* extend powermail fields tx_powermail_domain_model_field
*/
$tempColumns = array (
'tx_powermailextended_powermail_text' => array(
'exclude' => 1,
'label' => 'Text before field',
'config' => array (
'type' => 'text',
'cols' => '32',
'rows' => '2'
)
),
'tx_powermailextended_powermail_readonly' => array(
'exclude' => 1,
'label' => 'Readonly',
'config' => array (
'type' => 'check'
)
),
);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns(
'tx_powermail_domain_model_field',
$tempColumns
);
$tempColumns = [
'tx_powermailextended_powermail_text' => [
'exclude' => 1,
'label' => 'Text before field',
'config' => [
'type' => 'text',
'cols' => '32',
'rows' => '2'
]
],
'tx_powermailextended_powermail_readonly' => [
'exclude' => 1,
'label' => 'Readonly',
'config' => [
'type' => 'check'
]
],
];
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('tx_powermail_domain_model_field', $tempColumns);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes(
'tx_powermail_domain_model_field',
'--div--;Powermailextended, tx_powermailextended_powermail_text, tx_powermailextended_powermail_readonly',
'',
'after:own_marker_select'
'tx_powermail_domain_model_field',
'--div--;Powermailextended, tx_powermailextended_powermail_text, tx_powermailextended_powermail_readonly',
'',
'after:own_marker_select'
);

0 comments on commit dd1e00b

Please sign in to comment.