@@ -55,7 +55,6 @@ discard block |
||
| 55 | 55 | /** |
| 56 | 56 | * Creates .htaccess file inside the root directory |
| 57 | 57 | * |
| 58 | - * @param string $htaccessFile Path of .htaccess file |
|
| 59 | 58 | * @return void |
| 60 | 59 | */ |
| 61 | 60 | public function createDefaultHtaccessFile(){
|
@@ -96,7 +95,6 @@ discard block |
||
| 96 | 95 | /** |
| 97 | 96 | * Creates AdditionalConfiguration.php file inside the typo3conf directory |
| 98 | 97 | * |
| 99 | - * @param string $configurationFile Path of AdditionalConfiguration.php file |
|
| 100 | 98 | * @return void |
| 101 | 99 | */ |
| 102 | 100 | public function createDefaultAdditionalConfiguration($extension = NULL){
|
@@ -140,7 +138,6 @@ discard block |
||
| 140 | 138 | /** |
| 141 | 139 | * Creates robots.txt file inside the root directory |
| 142 | 140 | * |
| 143 | - * @param string $robotsFile Path of robots.txt file |
|
| 144 | 141 | * @return void |
| 145 | 142 | */ |
| 146 | 143 | public function createDefaultRobots($extension = NULL){
|
@@ -1,9 +1,9 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | namespace DCNGmbH\MooxCore\Service; |
| 4 | -use TYPO3\CMS\Core\Utility\GeneralUtility; |
|
| 5 | -use TYPO3\CMS\Core\Utility\ExtensionManagementUtility; |
|
| 6 | -use TYPO3\CMS\Core\Messaging\FlashMessage; |
|
| 4 | +use TYPO3\CMS\Core\Utility\GeneralUtility; |
|
| 5 | +use TYPO3\CMS\Core\Utility\ExtensionManagementUtility; |
|
| 6 | +use TYPO3\CMS\Core\Messaging\FlashMessage; |
|
| 7 | 7 | use TYPO3\CMS\Core\Utility\VersionNumberUtility; |
| 8 | 8 | |
| 9 | 9 | class InstallService {
|
@@ -21,10 +21,10 @@ discard block |
||
| 21 | 21 | /** |
| 22 | 22 | * Initializes the install service |
| 23 | 23 | */ |
| 24 | - public function __construct(){
|
|
| 25 | - if(VersionNumberUtility::convertVersionNumberToInteger(TYPO3_version) >= 7000000){
|
|
| 24 | + public function __construct() {
|
|
| 25 | + if (VersionNumberUtility::convertVersionNumberToInteger(TYPO3_version)>=7000000) {
|
|
| 26 | 26 | $this->messageQueueByIdentifier = 'extbase.flashmessages.tx_extensionmanager_tools_extensionmanagerextensionmanager'; |
| 27 | - }else{
|
|
| 27 | + }else {
|
|
| 28 | 28 | $this->messageQueueByIdentifier = 'core.template.flashMessages'; |
| 29 | 29 | } |
| 30 | 30 | } |
@@ -32,11 +32,11 @@ discard block |
||
| 32 | 32 | /** |
| 33 | 33 | * @param string $extension |
| 34 | 34 | */ |
| 35 | - public function generateApacheHtaccess($extension = NULL){
|
|
| 36 | - if($extension == $this->extKey){
|
|
| 37 | - if(substr($_SERVER['SERVER_SOFTWARE'], 0, 6) === 'Apache'){
|
|
| 35 | + public function generateApacheHtaccess($extension = NULL) {
|
|
| 36 | + if ($extension==$this->extKey) {
|
|
| 37 | + if (substr($_SERVER['SERVER_SOFTWARE'], 0, 6)==='Apache') {
|
|
| 38 | 38 | $this->createDefaultHtaccessFile(); |
| 39 | - }else{
|
|
| 39 | + }else {
|
|
| 40 | 40 | /** |
| 41 | 41 | * Add Flashmessage that the system it not running on an apache webserver and the url rewritings must be handled manually |
| 42 | 42 | */ |
@@ -58,10 +58,10 @@ discard block |
||
| 58 | 58 | * @param string $htaccessFile Path of .htaccess file |
| 59 | 59 | * @return void |
| 60 | 60 | */ |
| 61 | - public function createDefaultHtaccessFile(){
|
|
| 61 | + public function createDefaultHtaccessFile() {
|
|
| 62 | 62 | $htaccessFile = GeneralUtility::getFileAbsFileName(".htaccess");
|
| 63 | 63 | |
| 64 | - if(file_exists($htaccessFile)){
|
|
| 64 | + if (file_exists($htaccessFile)) {
|
|
| 65 | 65 | |
| 66 | 66 | /** |
| 67 | 67 | * Add Flashmessage that there is already an .htaccess file and we are not going to override this. |
@@ -99,12 +99,12 @@ discard block |
||
| 99 | 99 | * @param string $configurationFile Path of AdditionalConfiguration.php file |
| 100 | 100 | * @return void |
| 101 | 101 | */ |
| 102 | - public function createDefaultAdditionalConfiguration($extension = NULL){
|
|
| 103 | - if($extension == $this->extKey){
|
|
| 102 | + public function createDefaultAdditionalConfiguration($extension = NULL) {
|
|
| 103 | + if ($extension==$this->extKey) {
|
|
| 104 | 104 | |
| 105 | 105 | $configurationFile = GeneralUtility::getFileAbsFileName("typo3conf/AdditionalConfiguration.php");
|
| 106 | 106 | |
| 107 | - if(file_exists($configurationFile)){
|
|
| 107 | + if (file_exists($configurationFile)) {
|
|
| 108 | 108 | |
| 109 | 109 | /** |
| 110 | 110 | * Add Flashmessage that there is already an AdditionalConfiguration.php file and we are not going to override this. |
@@ -143,12 +143,12 @@ discard block |
||
| 143 | 143 | * @param string $robotsFile Path of robots.txt file |
| 144 | 144 | * @return void |
| 145 | 145 | */ |
| 146 | - public function createDefaultRobots($extension = NULL){
|
|
| 147 | - if($extension == $this->extKey){
|
|
| 146 | + public function createDefaultRobots($extension = NULL) {
|
|
| 147 | + if ($extension==$this->extKey) {
|
|
| 148 | 148 | |
| 149 | 149 | $robotsFile = GeneralUtility::getFileAbsFileName("robots.txt");
|
| 150 | 150 | |
| 151 | - if(file_exists($robotsFile)){
|
|
| 151 | + if (file_exists($robotsFile)) {
|
|
| 152 | 152 | |
| 153 | 153 | /** |
| 154 | 154 | * Add Flashmessage that there is already an robots.txt file and we are not going to override this. |
@@ -173,7 +173,7 @@ discard block |
||
| 173 | 173 | $robotsContent .= "Disallow: /*?id=* \n"; |
| 174 | 174 | $robotsContent .= "Disallow: /*&type=98 \n"; |
| 175 | 175 | $robotsContent .= " \n"; |
| 176 | - $robotsContent .= "Sitemap: http://" .$_SERVER['HTTP_HOST']. "/sitemap.xml"; |
|
| 176 | + $robotsContent .= "Sitemap: http://".$_SERVER['HTTP_HOST']."/sitemap.xml"; |
|
| 177 | 177 | GeneralUtility::writeFile($robotsFile, $robotsContent, TRUE); |
| 178 | 178 | |
| 179 | 179 | /** |
@@ -195,8 +195,8 @@ discard block |
||
| 195 | 195 | * |
| 196 | 196 | * @param FlashMessage $flashMessage |
| 197 | 197 | */ |
| 198 | - public function addFlashMessage(FlashMessage $flashMessage){
|
|
| 199 | - if($flashMessage){
|
|
| 198 | + public function addFlashMessage(FlashMessage $flashMessage) {
|
|
| 199 | + if ($flashMessage) {
|
|
| 200 | 200 | /** @var $flashMessageService \TYPO3\CMS\Core\Messaging\FlashMessageService */ |
| 201 | 201 | $flashMessageService = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessageService');
|
| 202 | 202 | /** @var $flashMessageQueue \TYPO3\CMS\Core\Messaging\FlashMessageQueue */ |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | public function __construct(){
|
| 25 | 25 | if(VersionNumberUtility::convertVersionNumberToInteger(TYPO3_version) >= 7000000){
|
| 26 | 26 | $this->messageQueueByIdentifier = 'extbase.flashmessages.tx_extensionmanager_tools_extensionmanagerextensionmanager'; |
| 27 | - }else{
|
|
| 27 | + } else{
|
|
| 28 | 28 | $this->messageQueueByIdentifier = 'core.template.flashMessages'; |
| 29 | 29 | } |
| 30 | 30 | } |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | if($extension == $this->extKey){
|
| 37 | 37 | if(substr($_SERVER['SERVER_SOFTWARE'], 0, 6) === 'Apache'){
|
| 38 | 38 | $this->createDefaultHtaccessFile(); |
| 39 | - }else{
|
|
| 39 | + } else{
|
|
| 40 | 40 | /** |
| 41 | 41 | * Add Flashmessage that the system it not running on an apache webserver and the url rewritings must be handled manually |
| 42 | 42 | */ |
@@ -8,90 +8,90 @@ discard block |
||
| 8 | 8 | |
| 9 | 9 | class InstallService {
|
| 10 | 10 | |
| 11 | - /** |
|
| 12 | - * @var string |
|
| 13 | - */ |
|
| 14 | - protected $extKey = 'moox_core'; |
|
| 11 | + /** |
|
| 12 | + * @var string |
|
| 13 | + */ |
|
| 14 | + protected $extKey = 'moox_core'; |
|
| 15 | 15 | |
| 16 | - /** |
|
| 17 | - * @var string |
|
| 18 | - */ |
|
| 19 | - protected $messageQueueByIdentifier = ''; |
|
| 16 | + /** |
|
| 17 | + * @var string |
|
| 18 | + */ |
|
| 19 | + protected $messageQueueByIdentifier = ''; |
|
| 20 | 20 | |
| 21 | - /** |
|
| 22 | - * Initializes the install service |
|
| 23 | - */ |
|
| 24 | - public function __construct(){
|
|
| 25 | - if(VersionNumberUtility::convertVersionNumberToInteger(TYPO3_version) >= 7000000){
|
|
| 26 | - $this->messageQueueByIdentifier = 'extbase.flashmessages.tx_extensionmanager_tools_extensionmanagerextensionmanager'; |
|
| 27 | - }else{
|
|
| 28 | - $this->messageQueueByIdentifier = 'core.template.flashMessages'; |
|
| 29 | - } |
|
| 30 | - } |
|
| 21 | + /** |
|
| 22 | + * Initializes the install service |
|
| 23 | + */ |
|
| 24 | + public function __construct(){
|
|
| 25 | + if(VersionNumberUtility::convertVersionNumberToInteger(TYPO3_version) >= 7000000){
|
|
| 26 | + $this->messageQueueByIdentifier = 'extbase.flashmessages.tx_extensionmanager_tools_extensionmanagerextensionmanager'; |
|
| 27 | + }else{
|
|
| 28 | + $this->messageQueueByIdentifier = 'core.template.flashMessages'; |
|
| 29 | + } |
|
| 30 | + } |
|
| 31 | 31 | |
| 32 | - /** |
|
| 33 | - * @param string $extension |
|
| 34 | - */ |
|
| 35 | - public function generateApacheHtaccess($extension = NULL){
|
|
| 36 | - if($extension == $this->extKey){
|
|
| 37 | - if(substr($_SERVER['SERVER_SOFTWARE'], 0, 6) === 'Apache'){
|
|
| 38 | - $this->createDefaultHtaccessFile(); |
|
| 39 | - }else{
|
|
| 40 | - /** |
|
| 41 | - * Add Flashmessage that the system it not running on an apache webserver and the url rewritings must be handled manually |
|
| 42 | - */ |
|
| 43 | - $flashMessage = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
|
|
| 44 | - 'The Bootstrap Package uses RealUrl to generate SEO friendly URLs by default, please take care of the URLs rewriting settings for your environment yourself.' |
|
| 45 | - . 'You can also deactivate RealUrl by changing your TypoScript setup to "config.tx_realurl_enable = 0".', |
|
| 46 | - 'TYPO3 is not running on an Apache-Webserver', |
|
| 47 | - FlashMessage::WARNING, |
|
| 48 | - TRUE |
|
| 49 | - ); |
|
| 50 | - $this->addFlashMessage($flashMessage); |
|
| 51 | - return; |
|
| 52 | - } |
|
| 53 | - } |
|
| 54 | - } |
|
| 55 | - /** |
|
| 32 | + /** |
|
| 33 | + * @param string $extension |
|
| 34 | + */ |
|
| 35 | + public function generateApacheHtaccess($extension = NULL){
|
|
| 36 | + if($extension == $this->extKey){
|
|
| 37 | + if(substr($_SERVER['SERVER_SOFTWARE'], 0, 6) === 'Apache'){
|
|
| 38 | + $this->createDefaultHtaccessFile(); |
|
| 39 | + }else{
|
|
| 40 | + /** |
|
| 41 | + * Add Flashmessage that the system it not running on an apache webserver and the url rewritings must be handled manually |
|
| 42 | + */ |
|
| 43 | + $flashMessage = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
|
|
| 44 | + 'The Bootstrap Package uses RealUrl to generate SEO friendly URLs by default, please take care of the URLs rewriting settings for your environment yourself.' |
|
| 45 | + . 'You can also deactivate RealUrl by changing your TypoScript setup to "config.tx_realurl_enable = 0".', |
|
| 46 | + 'TYPO3 is not running on an Apache-Webserver', |
|
| 47 | + FlashMessage::WARNING, |
|
| 48 | + TRUE |
|
| 49 | + ); |
|
| 50 | + $this->addFlashMessage($flashMessage); |
|
| 51 | + return; |
|
| 52 | + } |
|
| 53 | + } |
|
| 54 | + } |
|
| 55 | + /** |
|
| 56 | 56 | * Creates .htaccess file inside the root directory |
| 57 | 57 | * |
| 58 | 58 | * @param string $htaccessFile Path of .htaccess file |
| 59 | 59 | * @return void |
| 60 | 60 | */ |
| 61 | - public function createDefaultHtaccessFile(){
|
|
| 62 | - $htaccessFile = GeneralUtility::getFileAbsFileName(".htaccess");
|
|
| 61 | + public function createDefaultHtaccessFile(){
|
|
| 62 | + $htaccessFile = GeneralUtility::getFileAbsFileName(".htaccess");
|
|
| 63 | 63 | |
| 64 | - if(file_exists($htaccessFile)){
|
|
| 64 | + if(file_exists($htaccessFile)){
|
|
| 65 | 65 | |
| 66 | - /** |
|
| 67 | - * Add Flashmessage that there is already an .htaccess file and we are not going to override this. |
|
| 68 | - */ |
|
| 69 | - $flashMessage = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
|
|
| 70 | - 'There is already an Apache .htaccess file in the root directory, please make sure that the url rewritings are set properly.' |
|
| 71 | - . 'An example configuration is located at: typo3conf/ext/moox_core/Configuration/Apache/.htaccess', |
|
| 72 | - 'Apache .htaccess file already exists', |
|
| 73 | - FlashMessage::NOTICE, |
|
| 74 | - TRUE |
|
| 75 | - ); |
|
| 76 | - $this->addFlashMessage($flashMessage); |
|
| 66 | + /** |
|
| 67 | + * Add Flashmessage that there is already an .htaccess file and we are not going to override this. |
|
| 68 | + */ |
|
| 69 | + $flashMessage = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
|
|
| 70 | + 'There is already an Apache .htaccess file in the root directory, please make sure that the url rewritings are set properly.' |
|
| 71 | + . 'An example configuration is located at: typo3conf/ext/moox_core/Configuration/Apache/.htaccess', |
|
| 72 | + 'Apache .htaccess file already exists', |
|
| 73 | + FlashMessage::NOTICE, |
|
| 74 | + TRUE |
|
| 75 | + ); |
|
| 76 | + $this->addFlashMessage($flashMessage); |
|
| 77 | 77 | return; |
| 78 | 78 | } |
| 79 | 79 | |
| 80 | - $htaccessContent = GeneralUtility::getUrl(ExtensionManagementUtility::extPath($this->extKey).'/Configuration/Apache/.htaccess'); |
|
| 81 | - GeneralUtility::writeFile($htaccessFile, $htaccessContent, TRUE); |
|
| 80 | + $htaccessContent = GeneralUtility::getUrl(ExtensionManagementUtility::extPath($this->extKey).'/Configuration/Apache/.htaccess'); |
|
| 81 | + GeneralUtility::writeFile($htaccessFile, $htaccessContent, TRUE); |
|
| 82 | 82 | |
| 83 | - /** |
|
| 84 | - * Add Flashmessage that the example htaccess file was placed in the root directory |
|
| 85 | - */ |
|
| 86 | - $flashMessage = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
|
|
| 87 | - 'For RealURL and optimization purposes an example .htaccess file was placed in your root directory.' |
|
| 88 | - . ' Please check if the RewriteBase correctly set for your environment. ', |
|
| 89 | - 'Apache example .htaccess was placed in the root directory.', |
|
| 90 | - FlashMessage::OK, |
|
| 91 | - TRUE |
|
| 92 | - ); |
|
| 93 | - $this->addFlashMessage($flashMessage); |
|
| 94 | - } |
|
| 83 | + /** |
|
| 84 | + * Add Flashmessage that the example htaccess file was placed in the root directory |
|
| 85 | + */ |
|
| 86 | + $flashMessage = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
|
|
| 87 | + 'For RealURL and optimization purposes an example .htaccess file was placed in your root directory.' |
|
| 88 | + . ' Please check if the RewriteBase correctly set for your environment. ', |
|
| 89 | + 'Apache example .htaccess was placed in the root directory.', |
|
| 90 | + FlashMessage::OK, |
|
| 91 | + TRUE |
|
| 92 | + ); |
|
| 93 | + $this->addFlashMessage($flashMessage); |
|
| 94 | + } |
|
| 95 | 95 | |
| 96 | 96 | /** |
| 97 | 97 | * Creates AdditionalConfiguration.php file inside the typo3conf directory |
@@ -143,39 +143,39 @@ discard block |
||
| 143 | 143 | * @param string $robotsFile Path of robots.txt file |
| 144 | 144 | * @return void |
| 145 | 145 | */ |
| 146 | - public function createDefaultRobots($extension = NULL){
|
|
| 146 | + public function createDefaultRobots($extension = NULL){
|
|
| 147 | 147 | if($extension == $this->extKey){
|
| 148 | 148 | |
| 149 | - $robotsFile = GeneralUtility::getFileAbsFileName("robots.txt");
|
|
| 149 | + $robotsFile = GeneralUtility::getFileAbsFileName("robots.txt");
|
|
| 150 | 150 | |
| 151 | - if(file_exists($robotsFile)){
|
|
| 151 | + if(file_exists($robotsFile)){
|
|
| 152 | 152 | |
| 153 | 153 | /** |
| 154 | 154 | * Add Flashmessage that there is already an robots.txt file and we are not going to override this. |
| 155 | 155 | */ |
| 156 | 156 | $flashMessage = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
|
| 157 | - 'There is already an robots.txt file in the root directory.' |
|
| 158 | - . 'An example robots.txt is located at: typo3conf/ext/moox_core/Configuration/Robots/robots.txt', |
|
| 159 | - 'robots.txt file already exists', |
|
| 160 | - FlashMessage::NOTICE, |
|
| 161 | - TRUE |
|
| 157 | + 'There is already an robots.txt file in the root directory.' |
|
| 158 | + . 'An example robots.txt is located at: typo3conf/ext/moox_core/Configuration/Robots/robots.txt', |
|
| 159 | + 'robots.txt file already exists', |
|
| 160 | + FlashMessage::NOTICE, |
|
| 161 | + TRUE |
|
| 162 | 162 | ); |
| 163 | 163 | $this->addFlashMessage($flashMessage); |
| 164 | - return; |
|
| 165 | - } |
|
| 164 | + return; |
|
| 165 | + } |
|
| 166 | 166 | |
| 167 | - $robotsContent .= "User-Agent: * \n"; |
|
| 168 | - $robotsContent .= " \n"; |
|
| 169 | - $robotsContent .= "Allow: / \n"; |
|
| 170 | - $robotsContent .= "Disallow: /typo3/ \n"; |
|
| 171 | - $robotsContent .= " \n"; |
|
| 172 | - $robotsContent .= "Sitemap: http://" .$_SERVER['HTTP_HOST']. "/sitemap.xml"; |
|
| 173 | - GeneralUtility::writeFile($robotsFile, $robotsContent, TRUE); |
|
| 167 | + $robotsContent .= "User-Agent: * \n"; |
|
| 168 | + $robotsContent .= " \n"; |
|
| 169 | + $robotsContent .= "Allow: / \n"; |
|
| 170 | + $robotsContent .= "Disallow: /typo3/ \n"; |
|
| 171 | + $robotsContent .= " \n"; |
|
| 172 | + $robotsContent .= "Sitemap: http://" .$_SERVER['HTTP_HOST']. "/sitemap.xml"; |
|
| 173 | + GeneralUtility::writeFile($robotsFile, $robotsContent, TRUE); |
|
| 174 | 174 | |
| 175 | - /** |
|
| 176 | - * Add Flashmessage that the example AdditionalCOnfiguration.php file was placed in the typo3conf directory |
|
| 177 | - */ |
|
| 178 | - $flashMessage = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
|
|
| 175 | + /** |
|
| 176 | + * Add Flashmessage that the example AdditionalCOnfiguration.php file was placed in the typo3conf directory |
|
| 177 | + */ |
|
| 178 | + $flashMessage = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
|
|
| 179 | 179 | 'robots.txt file was placed in your root directory.', |
| 180 | 180 | 'robots.txt was placed in the root directory.', |
| 181 | 181 | FlashMessage::OK, |
@@ -184,21 +184,21 @@ discard block |
||
| 184 | 184 | $this->addFlashMessage($flashMessage); |
| 185 | 185 | |
| 186 | 186 | } |
| 187 | - } |
|
| 187 | + } |
|
| 188 | 188 | |
| 189 | - /** |
|
| 190 | - * Adds a Flash Message to the Flash Message Queue |
|
| 191 | - * |
|
| 192 | - * @param FlashMessage $flashMessage |
|
| 193 | - */ |
|
| 194 | - public function addFlashMessage(FlashMessage $flashMessage){
|
|
| 195 | - if($flashMessage){
|
|
| 196 | - /** @var $flashMessageService \TYPO3\CMS\Core\Messaging\FlashMessageService */ |
|
| 197 | - $flashMessageService = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessageService');
|
|
| 198 | - /** @var $flashMessageQueue \TYPO3\CMS\Core\Messaging\FlashMessageQueue */ |
|
| 199 | - $flashMessageQueue = $flashMessageService->getMessageQueueByIdentifier($this->messageQueueByIdentifier); |
|
| 200 | - $flashMessageQueue->enqueue($flashMessage); |
|
| 201 | - } |
|
| 202 | - } |
|
| 189 | + /** |
|
| 190 | + * Adds a Flash Message to the Flash Message Queue |
|
| 191 | + * |
|
| 192 | + * @param FlashMessage $flashMessage |
|
| 193 | + */ |
|
| 194 | + public function addFlashMessage(FlashMessage $flashMessage){
|
|
| 195 | + if($flashMessage){
|
|
| 196 | + /** @var $flashMessageService \TYPO3\CMS\Core\Messaging\FlashMessageService */ |
|
| 197 | + $flashMessageService = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessageService');
|
|
| 198 | + /** @var $flashMessageQueue \TYPO3\CMS\Core\Messaging\FlashMessageQueue */ |
|
| 199 | + $flashMessageQueue = $flashMessageService->getMessageQueueByIdentifier($this->messageQueueByIdentifier); |
|
| 200 | + $flashMessageQueue->enqueue($flashMessage); |
|
| 201 | + } |
|
| 202 | + } |
|
| 203 | 203 | |
| 204 | 204 | } |
@@ -36,14 +36,14 @@ |
||
| 36 | 36 | */ |
| 37 | 37 | class GetVimeoIdViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper {
|
| 38 | 38 | |
| 39 | - /** |
|
| 40 | - * @param string $url |
|
| 41 | - * @return string |
|
| 42 | - */ |
|
| 43 | - public function render($url) {
|
|
| 44 | - if (preg_match("/https?:\/\/(?:www\.)?vimeo.com\/(?:channels\/(?:\w+\/)?|groups\/([^\/]*)\/videos\/|album\/(\d+)\/video\/|)(\d+)(?:$|\/|\?)/", $url, $match)) {
|
|
| 45 | - $videoId = $match[3]; |
|
| 46 | - } |
|
| 47 | - return $videoId; |
|
| 48 | - } |
|
| 39 | + /** |
|
| 40 | + * @param string $url |
|
| 41 | + * @return string |
|
| 42 | + */ |
|
| 43 | + public function render($url) {
|
|
| 44 | + if (preg_match("/https?:\/\/(?:www\.)?vimeo.com\/(?:channels\/(?:\w+\/)?|groups\/([^\/]*)\/videos\/|album\/(\d+)\/video\/|)(\d+)(?:$|\/|\?)/", $url, $match)) {
|
|
| 45 | + $videoId = $match[3]; |
|
| 46 | + } |
|
| 47 | + return $videoId; |
|
| 48 | + } |
|
| 49 | 49 | } |
@@ -36,14 +36,14 @@ |
||
| 36 | 36 | */ |
| 37 | 37 | class GetYoutubeIdViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper {
|
| 38 | 38 | |
| 39 | - /** |
|
| 40 | - * @param string $url |
|
| 41 | - * @return string |
|
| 42 | - */ |
|
| 43 | - public function render($url) {
|
|
| 44 | - if (preg_match('%(?:youtube(?:-nocookie)?\.com/(?:[^/]+/.+/|(?:v|e(?:mbed)?)/|.*[?&]v=)|youtu\.be/)([^"&?/ ]{11})%i', $url, $match)) {
|
|
| 45 | - $videoId = $match[1]; |
|
| 46 | - } |
|
| 47 | - return $videoId; |
|
| 48 | - } |
|
| 39 | + /** |
|
| 40 | + * @param string $url |
|
| 41 | + * @return string |
|
| 42 | + */ |
|
| 43 | + public function render($url) {
|
|
| 44 | + if (preg_match('%(?:youtube(?:-nocookie)?\.com/(?:[^/]+/.+/|(?:v|e(?:mbed)?)/|.*[?&]v=)|youtu\.be/)([^"&?/ ]{11})%i', $url, $match)) {
|
|
| 45 | + $videoId = $match[1]; |
|
| 46 | + } |
|
| 47 | + return $videoId; |
|
| 48 | + } |
|
| 49 | 49 | } |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | 'text' => 'mimetypes-x-content-text' |
| 29 | 29 | ) |
| 30 | 30 | ); |
| 31 | -if (TRUE === isset($GLOBALS['TCA']['tt_content']['ctrl']['typeicons'])) { |
|
| 31 | +if (TRUE===isset($GLOBALS['TCA']['tt_content']['ctrl']['typeicons'])) { |
|
| 32 | 32 | $GLOBALS['TCA']['tt_content']['ctrl']['typeicons'] = array_merge( |
| 33 | 33 | $GLOBALS['TCA']['tt_content']['ctrl']['typeicons'], |
| 34 | 34 | array( |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | $GLOBALS['TYPO3_CONF_VARS']['SYS']['FileInfo']['fileExtensionToMimeType']['ogv'] = 'video/ogv'; |
| 59 | 59 | $GLOBALS['TYPO3_CONF_VARS']['SYS']['mediafile_ext'] .= ',ogv'; |
| 60 | 60 | |
| 61 | -$additionalColumns = Array ( |
|
| 61 | +$additionalColumns = Array( |
|
| 62 | 62 | 'assets' => Array( |
| 63 | 63 | 'label' => 'LLL:EXT:moox_core/Resources/Private/Language/Database.xlf:tt_content.asset_references', |
| 64 | 64 | 'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig('assets', Array( |
@@ -68,52 +68,52 @@ discard block |
||
| 68 | 68 | 'foreign_types' => $GLOBALS['TCA']['tt_content']['columns']['image']['config']['foreign_types'] |
| 69 | 69 | ), $GLOBALS['TYPO3_CONF_VARS']['SYS']['mediafile_ext']) |
| 70 | 70 | ), |
| 71 | - 'tx_mooxcore_hide_desktop' => Array ( |
|
| 71 | + 'tx_mooxcore_hide_desktop' => Array( |
|
| 72 | 72 | 'exclude' => 1, |
| 73 | 73 | 'label' => 'LLL:EXT:moox_core/Resources/Private/Language/Database.xlf:tt_content.tx_mooxcore_hide_desktop', |
| 74 | - 'config' => Array ( |
|
| 74 | + 'config' => Array( |
|
| 75 | 75 | 'type' => 'check', |
| 76 | 76 | ) |
| 77 | 77 | ), |
| 78 | - 'tx_mooxcore_hide_laptop' => Array ( |
|
| 78 | + 'tx_mooxcore_hide_laptop' => Array( |
|
| 79 | 79 | 'exclude' => 1, |
| 80 | 80 | 'label' => 'LLL:EXT:moox_core/Resources/Private/Language/Database.xlf:tt_content.tx_mooxcore_hide_laptop', |
| 81 | - 'config' => Array ( |
|
| 81 | + 'config' => Array( |
|
| 82 | 82 | 'type' => 'check', |
| 83 | 83 | ) |
| 84 | 84 | ), |
| 85 | - 'tx_mooxcore_hide_tablet' => Array ( |
|
| 85 | + 'tx_mooxcore_hide_tablet' => Array( |
|
| 86 | 86 | 'exclude' => 1, |
| 87 | 87 | 'label' => 'LLL:EXT:moox_core/Resources/Private/Language/Database.xlf:tt_content.tx_mooxcore_hide_tablet', |
| 88 | - 'config' => Array ( |
|
| 88 | + 'config' => Array( |
|
| 89 | 89 | 'type' => 'check', |
| 90 | 90 | ) |
| 91 | 91 | ), |
| 92 | - 'tx_mooxcore_hide_phone' => Array ( |
|
| 92 | + 'tx_mooxcore_hide_phone' => Array( |
|
| 93 | 93 | 'exclude' => 1, |
| 94 | 94 | 'label' => 'LLL:EXT:moox_core/Resources/Private/Language/Database.xlf:tt_content.tx_mooxcore_hide_phone', |
| 95 | - 'config' => Array ( |
|
| 95 | + 'config' => Array( |
|
| 96 | 96 | 'type' => 'check', |
| 97 | 97 | ) |
| 98 | 98 | ), |
| 99 | - 'tx_mooxcore_hide_print' => Array ( |
|
| 99 | + 'tx_mooxcore_hide_print' => Array( |
|
| 100 | 100 | 'exclude' => 1, |
| 101 | 101 | 'label' => 'LLL:EXT:moox_core/Resources/Private/Language/Database.xlf:tt_content.tx_mooxcore_hide_print', |
| 102 | - 'config' => Array ( |
|
| 102 | + 'config' => Array( |
|
| 103 | 103 | 'type' => 'check', |
| 104 | 104 | ) |
| 105 | 105 | ), |
| 106 | - 'tx_mooxcore_hide_barrierfree' => Array ( |
|
| 106 | + 'tx_mooxcore_hide_barrierfree' => Array( |
|
| 107 | 107 | 'exclude' => 1, |
| 108 | 108 | 'label' => 'LLL:EXT:moox_core/Resources/Private/Language/Database.xlf:tt_content.tx_mooxcore_hide_barrierfree', |
| 109 | - 'config' => Array ( |
|
| 109 | + 'config' => Array( |
|
| 110 | 110 | 'type' => 'check', |
| 111 | 111 | ) |
| 112 | 112 | ), |
| 113 | - 'tx_mooxcore_hide_oldbrowser' => Array ( |
|
| 113 | + 'tx_mooxcore_hide_oldbrowser' => Array( |
|
| 114 | 114 | 'exclude' => 1, |
| 115 | 115 | 'label' => 'LLL:EXT:moox_core/Resources/Private/Language/Database.xlf:tt_content.tx_mooxcore_hide_oldbrowser', |
| 116 | - 'config' => Array ( |
|
| 116 | + 'config' => Array( |
|
| 117 | 117 | 'type' => 'check', |
| 118 | 118 | ) |
| 119 | 119 | ), |
@@ -419,12 +419,12 @@ discard block |
||
| 419 | 419 | $GLOBALS['TCA']['tt_content']['palettes']['table'] |
| 420 | 420 | ); |
| 421 | 421 | |
| 422 | -if (FALSE === \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('form')) { |
|
| 423 | - unset( $GLOBALS['TCA']['tt_content']['types']['mailform'] ); |
|
| 422 | +if (FALSE===\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('form')) { |
|
| 423 | + unset($GLOBALS['TCA']['tt_content']['types']['mailform']); |
|
| 424 | 424 | } |
| 425 | 425 | |
| 426 | 426 | foreach ($GLOBALS['TCA']['tt_content']['columns']['CType']['config']['items'] as $index => $item) { |
| 427 | - if ($item[1] === 'multimedia') { |
|
| 427 | + if ($item[1]==='multimedia') { |
|
| 428 | 428 | unset($GLOBALS['TCA']['tt_content']['columns']['CType']['config']['items'][$index]); |
| 429 | 429 | } |
| 430 | 430 | }; |
@@ -4,7 +4,7 @@ discard block |
||
| 4 | 4 | } |
| 5 | 5 | |
| 6 | 6 | \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile($_EXTKEY, 'Configuration/TypoScript', 'MOOX Core'); |
| 7 | -if ('BE' === TYPO3_MODE) { |
|
| 7 | +if ('BE'===TYPO3_MODE) { |
|
| 8 | 8 | \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScript($_EXTKEY, 'constants', '<INCLUDE_TYPOSCRIPT: source="FILE:EXT:moox_core/Configuration/TypoScript/constants.txt">'); |
| 9 | 9 | \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScript($_EXTKEY, 'setup', '<INCLUDE_TYPOSCRIPT: source="FILE:EXT:moox_core/Configuration/TypoScript/setup.txt">'); |
| 10 | 10 | } |
@@ -13,10 +13,10 @@ discard block |
||
| 13 | 13 | |
| 14 | 14 | $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['moox_core']['setup'] = unserialize($_EXTCONF); |
| 15 | 15 | |
| 16 | -if (FALSE === (boolean) $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['moox_core']['setup']['disablePageTemplates']) { |
|
| 16 | +if (FALSE===(boolean)$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['moox_core']['setup']['disablePageTemplates']) { |
|
| 17 | 17 | \FluidTYPO3\Flux\Core::registerProviderExtensionKey('DCNGmbH.MooxCore', 'Page'); |
| 18 | 18 | } |
| 19 | -if (FALSE === (boolean) $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['moox_core']['setup']['disableContentTemplates']) { |
|
| 19 | +if (FALSE===(boolean)$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['moox_core']['setup']['disableContentTemplates']) { |
|
| 20 | 20 | \FluidTYPO3\Flux\Core::registerProviderExtensionKey('DCNGmbH.MooxCore', 'Content'); |
| 21 | 21 | } |
| 22 | 22 | |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | Register BE-Module for Administration |
| 26 | 26 | =========================================================================== */ |
| 27 | 27 | |
| 28 | -if (TYPO3_MODE === 'BE' && !(TYPO3_REQUESTTYPE & TYPO3_REQUESTTYPE_INSTALL)) { |
|
| 28 | +if (TYPO3_MODE==='BE' && !(TYPO3_REQUESTTYPE&TYPO3_REQUESTTYPE_INSTALL)) { |
|
| 29 | 29 | |
| 30 | 30 | /*************** |
| 31 | 31 | * Register Main Module |
@@ -34,10 +34,10 @@ discard block |
||
| 34 | 34 | if (!isset($TBE_MODULES[$mainModuleName])) { |
| 35 | 35 | $temp_TBE_MODULES = array(); |
| 36 | 36 | foreach ($TBE_MODULES as $key => $val) { |
| 37 | - if ($key == 'web') { |
|
| 37 | + if ($key=='web') { |
|
| 38 | 38 | $temp_TBE_MODULES[$key] = $val; |
| 39 | 39 | $temp_TBE_MODULES[$mainModuleName] = ''; |
| 40 | - } else { |
|
| 40 | + }else { |
|
| 41 | 41 | $temp_TBE_MODULES[$key] = $val; |
| 42 | 42 | } |
| 43 | 43 | } |
@@ -65,8 +65,8 @@ discard block |
||
| 65 | 65 | ), |
| 66 | 66 | array( |
| 67 | 67 | 'access' => 'user,group', |
| 68 | - 'icon' => 'EXT:' . $_EXTKEY . '/Resources/Public/Icons/module-mooxcore.svg', |
|
| 69 | - 'labels' => 'LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/Module.xlf:moox_dashboard_module_tab', |
|
| 68 | + 'icon' => 'EXT:'.$_EXTKEY.'/Resources/Public/Icons/module-mooxcore.svg', |
|
| 69 | + 'labels' => 'LLL:EXT:'.$_EXTKEY.'/Resources/Private/Language/Module.xlf:moox_dashboard_module_tab', |
|
| 70 | 70 | ) |
| 71 | 71 | ); |
| 72 | 72 | } |