Skip to content
This repository has been archived by the owner on Dec 4, 2018. It is now read-only.

Commit

Permalink
Merge branch 'development'
Browse files Browse the repository at this point in the history
  • Loading branch information
NamelessCoder committed Aug 8, 2015
2 parents 8302c75 + e45f2f1 commit 0ce7d27
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 10 deletions.
16 changes: 9 additions & 7 deletions Classes/Provider/ContentProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,15 @@ public function injectConfigurationService(ConfigurationService $configurationSe
*/
public function getForm(array $row) {
$form = parent::getForm($row);
$moveSortingProperty = (
defined('FluidTYPO3\\Flux\\Form::OPTION_SORTING')
&& FALSE === $form->hasOption(Form::OPTION_SORTING)
&& TRUE === $form->hasOption('Fluidcontent.sorting')
);
if (NULL !== $form && TRUE === $moveSortingProperty) {
$form->setOption(Form::OPTION_SORTING, $form->getOption('Fluidcontent.sorting'));
if (NULL !== $form) {
$moveSortingProperty = (
defined('FluidTYPO3\\Flux\\Form::OPTION_SORTING')
&& FALSE === $form->hasOption(Form::OPTION_SORTING)
&& TRUE === $form->hasOption('Fluidcontent.sorting')
);
if (TRUE === $moveSortingProperty) {
$form->setOption(Form::OPTION_SORTING, $form->getOption('Fluidcontent.sorting'));
}
}
return $form;
}
Expand Down
11 changes: 10 additions & 1 deletion Classes/Service/ConfigurationService.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ class ConfigurationService extends FluxService implements SingletonInterface {
*/
const ICON_HEIGHT = 24;

/**
* @var array
*/
protected $extConf;

/**
* @var CacheManager
*/
Expand Down Expand Up @@ -86,6 +91,10 @@ public function injectRecordService(WorkspacesAwareRecordService $recordService)
*/
public function __construct() {
$this->defaultIcon = '../' . ExtensionManagementUtility::siteRelPath('fluidcontent') . 'Resources/Public/Icons/Plugin.png';

$this->extConf = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['fluidcontent']);
$this->extConf['iconWidth'] = $this->extConf['iconWidth'] ? : self::ICON_WIDTH;
$this->extConf['iconHeight'] = $this->extConf['iconHeight'] ? : self::ICON_HEIGHT;
}

/**
Expand Down Expand Up @@ -334,7 +343,7 @@ protected function buildWizardTabItem($tabId, $id, $form, $templateFileIdentity)
}

if (TRUE === file_exists($icon) && TRUE === method_exists('FluidTYPO3\\Flux\\Utility\\MiscellaneousUtility', 'createIcon')) {
$icon = '../..' . MiscellaneousUtility::createIcon($icon, self::ICON_WIDTH, self::ICON_HEIGHT);
$icon = '../..' . MiscellaneousUtility::createIcon($icon, $this->extConf['iconWidth'], $this->extConf['iconHeight']);
}

return sprintf('
Expand Down
6 changes: 6 additions & 0 deletions ext_conf_template.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# cat=basic/enable; type=integer; label=Set the width of the content element icon. 0 = no scaling
iconWidth = 24

# cat=basic/enable; type=integer; label=Set the height of the content element icon. 0 = no scaling
iconHeight = 24

4 changes: 2 additions & 2 deletions ext_emconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
'conflicts' => '',
'priority' => '',
'module' => '',
'state' => 'stable',
'state' => 'beta',
'internal' => '',
'uploadfolder' => 0,
'createDirs' => '',
Expand All @@ -34,7 +34,7 @@
'depends' => array(
'typo3' => '6.2.0-7.4.99',
'cms' => '',
'flux' => '7.2.0-7.2.99',
'flux' => '7.2.0-7.3.99',
),
'conflicts' => array(
),
Expand Down

0 comments on commit 0ce7d27

Please sign in to comment.