-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26 from jonathanheilmann/v0.1.0
[RELEASE] Release of version 0.1.0
- Loading branch information
Showing
33 changed files
with
1,526 additions
and
231 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,43 @@ | ||
## TYPO3 v4 | ||
# Ignore serveral upload and file directories. | ||
/fileadmin/user_upload/ | ||
/fileadmin/_temp_/ | ||
/uploads/ | ||
# Ignore cache | ||
/typo3conf/temp_CACHED* | ||
/typo3conf/temp_fieldInfo.php | ||
# Ignore local config which overrides typo3 config. | ||
# You should include your local stuff with `@include('localconf_local.php');` at the end of localconf.php. | ||
# See http://stackoverflow.com/questions/11905360/how-best-to-manage-typo3-installations-using-git for details. | ||
/typo3conf/localconf_local.php | ||
# Ignore system folders, you should have them symlinked. | ||
# If not comment out the following two entries. | ||
/typo3 | ||
/t3lib | ||
# Ignore temp directory. | ||
/typo3temp/ | ||
## | ||
# Local | ||
## | ||
|
||
|
||
## | ||
# https://gist.github.com/jonathanheilmann/79228adada3521a90a54 | ||
## | ||
|
||
## | ||
# OSX | ||
## | ||
.DS_Store | ||
.AppleDouble | ||
.LSOverride | ||
|
||
## | ||
# Windows | ||
## | ||
# Windows image file caches | ||
Thumbs.db | ||
ehthumbs.db | ||
# Folder config file | ||
Desktop.ini | ||
# Recycle Bin used on file shares | ||
$RECYCLE.BIN/ | ||
# Windows Installer files | ||
*.cab | ||
*.msi | ||
*.msm | ||
*.msp | ||
# Windows shortcuts | ||
*.lnk | ||
|
||
## | ||
# all OS | ||
## | ||
*.bak | ||
|
||
## | ||
# PhpStorm | ||
## | ||
.idea/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
65 changes: 65 additions & 0 deletions
65
Classes/ViewHelpers/CssStyledContent/RenderTextpicViewHelper.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
<?php | ||
namespace Heilmann\JhPhotoswipe\ViewHelpers\CssStyledContent; | ||
|
||
/*************************************************************** | ||
* | ||
* Copyright notice | ||
* | ||
* (c) 2016-2017 Jonathan Heilmann <mail@jonathan-heilmann.de> | ||
* | ||
* All rights reserved | ||
* | ||
* This script is part of the TYPO3 project. The TYPO3 project is | ||
* free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation; either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* The GNU General Public License can be found at | ||
* http://www.gnu.org/copyleft/gpl.html. | ||
* | ||
* This script is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* This copyright notice MUST APPEAR in all copies of the script! | ||
***************************************************************/ | ||
use TYPO3\CMS\Core\Utility\GeneralUtility; | ||
use TYPO3\CMS\CssStyledContent\Controller\CssStyledContentController; | ||
use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper; | ||
use TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer; | ||
|
||
/** | ||
* Class RenderTextpicViewHelperViewHelper | ||
* @package Heilmann\JhPhotoswipe\ViewHelpers\CssStyledContent | ||
*/ | ||
class RenderTextpicViewHelper extends AbstractViewHelper | ||
{ | ||
|
||
/** | ||
* Render method | ||
* | ||
* @param string $typoscriptObjectPath | ||
* @param array $data | ||
* @return string | ||
*/ | ||
public function render($typoscriptObjectPath, array $data) | ||
{ | ||
$typoscriptObjectPath = GeneralUtility::trimExplode('.', $typoscriptObjectPath, true); | ||
$setup = $GLOBALS['TSFE']->tmpl->setup; | ||
foreach ($typoscriptObjectPath as $pathSegment) | ||
$setup = isset($setup[$pathSegment . '.']) ? $setup[$pathSegment . '.'] : null; | ||
if ($setup === null) | ||
return ''; | ||
|
||
|
||
/** @var CssStyledContentController $cssStyledContentController */ | ||
$cssStyledContentController = $this->objectManager->get(CssStyledContentController::class); | ||
/** @var ContentObjectRenderer cObj */ | ||
$cssStyledContentController->cObj = $this->objectManager->get(ContentObjectRenderer::class); | ||
$cssStyledContentController->cObj->start($data, 'tt_content'); | ||
|
||
return $cssStyledContentController->render_textpic('', $setup); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
<?php | ||
namespace Heilmann\JhPhotoswipe\ViewHelpers\Extension; | ||
|
||
/*************************************************************** | ||
* | ||
* Copyright notice | ||
* | ||
* (c) 2016-2017 Jonathan Heilmann <mail@jonathan-heilmann.de> | ||
* | ||
* All rights reserved | ||
* | ||
* This script is part of the TYPO3 project. The TYPO3 project is | ||
* free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation; either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* The GNU General Public License can be found at | ||
* http://www.gnu.org/copyleft/gpl.html. | ||
* | ||
* This script is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* This copyright notice MUST APPEAR in all copies of the script! | ||
***************************************************************/ | ||
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility; | ||
use TYPO3\CMS\Core\Utility\GeneralUtility; | ||
use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper; | ||
|
||
/** | ||
* Class InListLoadedViewHelper | ||
* @package Heilmann\JhPhotoswipe\ViewHelpers\Extension | ||
*/ | ||
class InListLoadedViewHelper extends AbstractViewHelper | ||
{ | ||
|
||
/** | ||
* Initialize arguments | ||
*/ | ||
public function initializeArguments() | ||
{ | ||
parent::initializeArguments(); | ||
$this->registerArgument('list', 'string', 'Comma separated list of extensions names that may be loaded, UpperCamelCase', true); | ||
} | ||
|
||
/** | ||
* Render method | ||
* | ||
* @return string Name of the loaded extension. If no extension from list ist loaded, false is returned | ||
*/ | ||
public function render() | ||
{ | ||
$listItems = GeneralUtility::trimExplode(',', $this->arguments['list'], true); | ||
|
||
if (count($listItems) >= 1) | ||
foreach ($listItems as $extensionName) | ||
{ | ||
$extensionKey = GeneralUtility::camelCaseToLowerCaseUnderscored($extensionName); | ||
$isLoaded = ExtensionManagementUtility::isLoaded($extensionKey); | ||
if ($isLoaded) | ||
return $extensionName; | ||
} | ||
|
||
return false; | ||
} | ||
} |
Oops, something went wrong.