예제 #1
1
 /**
  * Render the captcha image html
  *
  * @param string suffix to be appended to the extenstion key when forming css class names
  * @return string The html used to render the captcha image
  */
 public function render($suffix = '')
 {
     $value = '';
     // Include the required JavaScript
     $GLOBALS['TSFE']->additionalHeaderData[$this->extensionKey . '_freeCap'] = '<script type="text/javascript" src="' . GeneralUtility::createVersionNumberedFilename(ExtensionManagementUtility::siteRelPath($this->extensionKey) . 'Resources/Public/JavaScript/freeCap.js') . '"></script>';
     // Disable caching
     $GLOBALS['TSFE']->no_cache = 1;
     // Get the plugin configuration
     $settings = $this->configurationManager->getConfiguration(ConfigurationManagerInterface::CONFIGURATION_TYPE_SETTINGS, $this->extensionName);
     // Get the translation view helper
     $objectManager = GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Object\\ObjectManager');
     $translator = $objectManager->get('SJBR\\SrFreecap\\ViewHelpers\\TranslateViewHelper');
     $translator->injectConfigurationManager($this->configurationManager);
     // Generate the image url
     $fakeId = GeneralUtility::shortMD5(uniqid(rand()), 5);
     $siteURL = GeneralUtility::getIndpEnv('TYPO3_SITE_URL');
     $L = GeneralUtility::_GP('L');
     $urlParams = array('eID' => 'sr_freecap_EidDispatcher', 'id' => $GLOBALS['TSFE']->id, 'vendorName' => 'SJBR', 'extensionName' => 'SrFreecap', 'pluginName' => 'ImageGenerator', 'controllerName' => 'ImageGenerator', 'actionName' => 'show', 'formatName' => 'png', 'L' => $GLOBALS['TSFE']->sys_language_uid);
     if ($GLOBALS['TSFE']->MP) {
         $urlParams['MP'] = $GLOBALS['TSFE']->MP;
     }
     $urlParams['set'] = $fakeId;
     $imageUrl = $siteURL . 'index.php?' . ltrim(GeneralUtility::implodeArrayForUrl('', $urlParams), '&');
     // Generate the html text
     $value = '<img' . $this->getClassAttribute('image', $suffix) . ' id="tx_srfreecap_captcha_image_' . $fakeId . '"' . ' src="' . htmlspecialchars($imageUrl) . '"' . ' alt="' . $translator->render('altText') . ' "/>' . '<span' . $this->getClassAttribute('cant-read', $suffix) . '>' . $translator->render('cant_read1') . ' <a href="#" onclick="this.blur();' . $this->extensionName . '.newImage(\'' . $fakeId . '\', \'' . $translator->render('noImageMessage') . '\');return false;">' . $translator->render('click_here') . '</a>' . $translator->render('cant_read2') . '</span>';
     return $value;
 }
 /**
  * Returns all settings.
  *
  * @return array
  */
 public function getSettings()
 {
     if ($this->settings === NULL) {
         $this->settings = $this->configurationManager->getConfiguration(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::CONFIGURATION_TYPE_SETTINGS, 'News', 'Pi1');
     }
     return $this->settings;
 }
예제 #3
0
 /**
  * Action initializer
  *
  * @return void
  */
 protected function initializeAction()
 {
     $pageId = (int) \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('id');
     $frameworkConfiguration = $this->configurationManager->getConfiguration(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK);
     $persistenceConfiguration = ['persistence' => ['storagePid' => $pageId]];
     $this->configurationManager->setConfiguration(array_merge($frameworkConfiguration, $persistenceConfiguration));
 }
 /**
  * Returns the TS configuration
  *
  * @return array|mixed
  */
 public function getConfiguration()
 {
     if ($this->configuration === NULL) {
         $this->configuration = $this->configurationManager->getConfiguration(ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK);
     }
     return $this->configuration;
 }
예제 #5
0
 /**
  * Initializes configuration manager, object container and reflection service
  *
  * @param array $configuration
  * @return void
  */
 protected function initialize(array $configuration)
 {
     // initialize unconsumed Request and Response
     $this->request = $this->objectManager->get('TYPO3\\CMS\\Extbase\\Mvc\\Cli\\Request');
     $this->response = $this->objectManager->get('TYPO3\\CMS\\Extbase\\Mvc\\Cli\\Response');
     // initialize configuration
     $this->configurationManager->setContentObject(\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Frontend\\ContentObject\\ContentObjectRenderer'));
     $this->configurationManager->setConfiguration($configuration);
     // configure object container
     $frameworkConfiguration = $this->configurationManager->getConfiguration(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK);
     if (isset($frameworkConfiguration['objects'])) {
         $objectContainer = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Object\\Container\\Container');
         foreach ($frameworkConfiguration['objects'] as $classNameWithDot => $classConfiguration) {
             if (isset($classConfiguration['className'])) {
                 $originalClassName = rtrim($classNameWithDot, '.');
                 $objectContainer->registerImplementation($originalClassName, $classConfiguration['className']);
             }
         }
     }
     // initialize reflection
     $reflectionService = $this->objectManager->get('TYPO3\\CMS\\Extbase\\Reflection\\ReflectionService');
     $reflectionService->setDataCache(\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Cache\\CacheManager')->getCache('extbase_reflection'));
     if (!$reflectionService->isInitialized()) {
         $reflectionService->initialize();
     }
 }
 /**
  * The cleanup command
  *
  * @return void
  */
 public function cleanupCommand()
 {
     $fullSettings = $this->configurationManager->getConfiguration(ConfigurationManagerInterface::CONFIGURATION_TYPE_FULL_TYPOSCRIPT, 'SfEventMgt', 'Pievent');
     $settings = $fullSettings['plugin.']['tx_sfeventmgt.']['settings.'];
     $this->registrationService->handleExpiredRegistrations($settings['registration.']['deleteExpiredRegistrations']);
     $pidList = explode(',', $settings['clearCacheUids']);
     $this->cacheService->clearPageCache($pidList);
 }
예제 #7
0
 /**
  * Initialize objects
  */
 public function initializeObject()
 {
     $configuration = $this->configurationManager->getConfiguration(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK);
     $this->settings = $configuration['settings'];
     $this->features = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
     $this->priceInfluencer = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
     $this->information = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
 }
 /**
  * The cleanup command
  *
  * @return void
  */
 public function cleanupCommand()
 {
     $fullSettings = $this->configurationManager->getConfiguration(ConfigurationManagerInterface::CONFIGURATION_TYPE_FULL_TYPOSCRIPT, 'SfEventMgt', 'Pievent');
     $settings = $fullSettings['plugin.']['tx_sfeventmgt.']['settings.'];
     $this->registrationService->handleExpiredRegistrations($settings['registration.']['deleteExpiredRegistrations']);
     // Clear cache for configured pages
     $this->utilityService->clearCacheForConfiguredUids($settings);
 }
예제 #9
0
 /**
  * Injects the Configuration Manager
  *
  * @param ConfigurationManagerInterface $configurationManager
  * @return void
  */
 public function injectConfigurationManager(ConfigurationManagerInterface $configurationManager)
 {
     $this->configurationManager = $configurationManager;
     $typoScriptSetup = $this->configurationManager->getConfiguration(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::CONFIGURATION_TYPE_FULL_TYPOSCRIPT);
     if (!empty($typoScriptSetup['plugin.']['tx_powermail.']['settings.']['setup.'])) {
         $this->settings = \TYPO3\CMS\Core\Utility\GeneralUtility::removeDotsFromTS($typoScriptSetup['plugin.']['tx_powermail.']['settings.']['setup.']);
     }
 }
예제 #10
0
 /**
  * Initialize the object (called by objectManager)
  * 
  */
 public function initializeObject()
 {
     $frameWorkConfiguration = $this->configurationManager->getConfiguration(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK);
     $this->extensionName = $frameWorkConfiguration['extensionName'];
     $this->extensionNameSpace = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Object\\ObjectManager')->get('TYPO3\\CMS\\Extbase\\Service\\ExtensionService')->getPluginNamespace($frameWorkConfiguration['extensionName'], $frameWorkConfiguration['pluginName']);
     $this->inCachedMode = $frameWorkConfiguration['pluginName'] == 'Cached' ? true : false;
     unset($frameWorkConfiguration);
 }
 /**
  * Initialize the object (called by objectManager)
  *
  */
 public function initializeObject()
 {
     $frameWorkConfiguration = $this->configurationManager->getConfiguration(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK);
     $this->extensionName = $frameWorkConfiguration['extensionName'];
     $this->setExtensionNamespace($frameWorkConfiguration['extensionName'], $frameWorkConfiguration['pluginName']);
     $this->isInCachedMode = $frameWorkConfiguration['pluginName'] == 'Cached' ? true : false;
     $this->currentListIdentifier = $frameWorkConfiguration['settings']['listIdentifier'];
     unset($frameWorkConfiguration);
 }
 /**
  * Action initializer
  *
  * @return void
  */
 protected function initializeAction()
 {
     # $this->pageId = (int)t3lib_div::_GP('id');
     $this->pageId = (int) $GLOBALS['TSFE']->id;
     $frameworkConfiguration = $this->configurationManager->getConfiguration(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK);
     $persistenceConfiguration = array('persistence' => array('storagePid' => $this->pageId));
     $this->configurationManager->setConfiguration(array_merge($frameworkConfiguration, $persistenceConfiguration));
     #debug($this->request->getArguments());
 }
 /**
  * Check if this field is a required field
  *
  * @param \string $fieldName
  * @param \string $actionName
  * @return \bool
  */
 public function render($fieldName, $actionName = 'editAction')
 {
     $action = str_replace('Action', '', $actionName);
     $configuration = $this->configurationManager->getConfiguration(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK);
     if (isset($configuration['settings'][$action]['validation'][$fieldName]['required']) && $configuration['settings'][$action]['validation'][$fieldName]['required'] === '1') {
         return TRUE;
     }
     return FALSE;
 }
예제 #14
0
 /**
  * @return \Tx_Yag_Domain_Configuration_Image_ResolutionConfigCollection
  */
 protected function getSelectedResolutionConfigs()
 {
     $settings = $this->configurationManager->getConfiguration(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::CONFIGURATION_TYPE_SETTINGS, 'Yag', 'pi1');
     \Tx_Yag_Domain_Configuration_ConfigurationBuilderFactory::injectSettings($settings);
     $configurationBuilder = \Tx_Yag_Domain_Configuration_ConfigurationBuilderFactory::getInstance('default', 'backend');
     $resolutionConfigCollection = \Tx_Yag_Domain_Configuration_Image_ResolutionConfigCollectionFactory::getInstanceOfAllThemes($configurationBuilder);
     $selectedResolutionConfigCollection = $resolutionConfigCollection->extractCollectionByThemeList($this->selectedThemes);
     return $selectedResolutionConfigCollection;
 }
예제 #15
0
 /**
  * {@inheritdoc}
  */
 public function initializeObject()
 {
     $this->defaultOrderings = ['name' => QueryInterface::ORDER_ASCENDING];
     // Ensure correct storage PID is used, regardless of what plugin the
     // repository is injected into
     $config = $this->cm->getConfiguration(ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK, 'tevmailchimp');
     $querySettings = $this->objectManager->get('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Typo3QuerySettings');
     $querySettings->setStoragePageIds([$config['persistence']['storagePid']]);
     $this->setDefaultQuerySettings($querySettings);
 }
 /**
  * returns a standalone template
  *
  * @param  \string                              $templatePath the template path relative to templateRootPath (UpperCamelCase)
  * @return \TYPO3\CMS\Fluid\View\StandaloneView
  */
 public function buildTemplate($templatePath)
 {
     /** @var \TYPO3\CMS\Fluid\View\StandaloneView $view */
     $view = $this->objectManager->get('TYPO3\\CMS\\Fluid\\View\\StandaloneView');
     $extbaseFrameworkConfiguration = $this->configurationManager->getConfiguration(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK);
     $templateRootPath = \TYPO3\CMS\Core\Utility\GeneralUtility::getFileAbsFileName($extbaseFrameworkConfiguration['view']['templateRootPath']);
     $templatePathAndFilename = $templateRootPath . $templatePath;
     $view->setTemplatePathAndFilename($templatePathAndFilename);
     return $view;
 }
 /**
  * Call command
  */
 protected function callCommandMethod()
 {
     $this->settings = $this->configurationManager->getConfiguration(ConfigurationManagerInterface::CONFIGURATION_TYPE_SETTINGS, 'newsImporter');
     /** @var StorageRepository $storageRepository */
     $storageRepository = $this->objectManager->get(StorageRepository::class);
     foreach ($storageRepository->findAll() as $storage) {
         $storage->setEvaluatePermissions(FALSE);
     }
     parent::callCommandMethod();
 }
예제 #18
0
파일: Request.php 프로젝트: kj187/paypal
 /**
  * Inject all dependencies, DI is not available here
  */
 public function __construct()
 {
     $this->objectManager = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Object\\ObjectManager');
     $this->securityService = $this->objectManager->get('Aijko\\Paypal\\Service\\Security');
     $this->configurationManager = $this->objectManager->get('TYPO3\\CMS\\Extbase\\Configuration\\ConfigurationManagerInterface');
     $pluginConfiguration = $this->configurationManager->getConfiguration(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK, 'paypal');
     $this->settings = $pluginConfiguration['settings'];
     $this->securityService->injectSettings($this->settings);
     $this->viewUtility = $this->objectManager->get('Aijko\\SharepointConnector\\Utility\\View');
     $this->viewUtility->setTemplateRootPath($pluginConfiguration['view']['templateRootPath']);
 }
예제 #19
0
 protected function initializeAction()
 {
     if ($GLOBALS['TSFE'] === NULL) {
         $this->pageId = (int) \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('id');
     } else {
         $this->pageId = $GLOBALS['TSFE']->id;
     }
     $frameworkConfiguration = $this->configurationManager->getConfiguration(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK);
     $persistenceConfiguration = array('persistence' => array('storagePid' => $this->pageId));
     $this->configurationManager->setConfiguration(array_merge($frameworkConfiguration, $persistenceConfiguration));
     $this->piVars = $this->request->getArguments();
 }
예제 #20
0
 /**
  * @return string
  */
 public function render()
 {
     $fullTs = $this->configurationManager->getConfiguration(ConfigurationManagerInterface::CONFIGURATION_TYPE_FULL_TYPOSCRIPT);
     $reCaptchaSettings = $fullTs['plugin.']['tx_powermail.']['settings.']['setup.']['reCAPTCHA.'];
     if (isset($reCaptchaSettings) && is_array($reCaptchaSettings) && isset($reCaptchaSettings['siteKey']) && $reCaptchaSettings['siteKey']) {
         $this->templateVariableContainer->add('siteKey', $reCaptchaSettings['siteKey']);
         $content = $this->renderChildren();
         $this->templateVariableContainer->remove('siteKey');
     } else {
         throw new InvalidVariableException('No siteKey provided in TypoScript constants', 1358349150);
     }
     return $content;
 }
예제 #21
0
 /**
  * Creates a query object working on the given class name
  *
  * @param string $className The class name
  * @return \TYPO3\CMS\Extbase\Persistence\QueryInterface
  * @throws \TYPO3\CMS\Extbase\Persistence\Generic\Exception
  */
 public function create($className)
 {
     $query = $this->objectManager->get(\TYPO3\CMS\Extbase\Persistence\QueryInterface::class, $className);
     $querySettings = $this->objectManager->get(\TYPO3\CMS\Extbase\Persistence\Generic\QuerySettingsInterface::class);
     $dataMap = $this->dataMapper->getDataMap($className);
     if ($dataMap->getIsStatic() || $dataMap->getRootLevel()) {
         $querySettings->setRespectStoragePage(false);
     }
     $frameworkConfiguration = $this->configurationManager->getConfiguration(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK);
     $querySettings->setStoragePageIds(\TYPO3\CMS\Core\Utility\GeneralUtility::intExplode(',', $frameworkConfiguration['persistence']['storagePid']));
     $query->setQuerySettings($querySettings);
     return $query;
 }
예제 #22
0
 /**
  * A function for injecting dependencies. Should be called first
  * thing within the overridden 'execute' method.
  *
  * @param $extensionName
  * @param $pluginName
  */
 protected function initialize($extensionName, $pluginName)
 {
     $injectionService = GeneralUtility::makeInstance('CIC\\Cicbase\\Service\\InjectionService');
     $injectionService->doInjection($this);
     // Grab the settings array
     $this->configurationManager->setConfiguration(array('extensionName' => $extensionName, 'pluginName' => $pluginName));
     $this->settings = $this->configurationManager->getConfiguration(ConfigurationManagerInterface::CONFIGURATION_TYPE_SETTINGS);
     if (!$this->settings) {
         $configuration = $this->configurationManager->getConfiguration(ConfigurationManagerInterface::CONFIGURATION_TYPE_FULL_TYPOSCRIPT);
         $settings = $configuration['plugin.']['tx_' . strtolower($extensionName) . '.']['settings.'];
         $this->settings = $this->typoscriptService->convertTypoScriptArrayToPlainArray($settings);
     }
 }
예제 #23
0
 /**
  * Loads the typoscript configuration from a certain setup path.
  *
  * @param string $configurationPath The typoscript path
  * @return array The typoscript configuration for the specified path.
  * @throws Exception
  */
 public function loadTyposcriptFromPath($configurationPath)
 {
     $setup = $this->configurationManager->getConfiguration(ConfigurationManagerInterface::CONFIGURATION_TYPE_FULL_TYPOSCRIPT);
     $pathSegments = GeneralUtility::trimExplode('.', $configurationPath);
     $lastSegment = array_pop($pathSegments);
     foreach ($pathSegments as $segment) {
         if (!array_key_exists($segment . '.', $setup)) {
             throw new Exception('TypoScript object path "' . htmlspecialchars($configurationPath) . '" does not exist', 1253191023);
         }
         $setup = $setup[$segment . '.'];
     }
     return $setup[$lastSegment . '.'];
 }
예제 #24
0
 /**
  * Configures the object manager object configuration from
  * config.tx_extbase.objects
  *
  * @return void
  * @see initialize()
  * @todo this is duplicated code (see \TYPO3\CMS\Extbase\Core\Bootstrap::configureObjectManager())
  */
 public function configureObjectManager()
 {
     $typoScriptSetup = $this->configurationManager->getConfiguration(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::CONFIGURATION_TYPE_FULL_TYPOSCRIPT);
     if (!is_array($typoScriptSetup['config.']['tx_extbase.']['objects.'])) {
         return;
     }
     $objectContainer = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Extbase\Object\Container\Container::class);
     foreach ($typoScriptSetup['config.']['tx_extbase.']['objects.'] as $classNameWithDot => $classConfiguration) {
         if (isset($classConfiguration['className'])) {
             $originalClassName = rtrim($classNameWithDot, '.');
             $objectContainer->registerImplementation($originalClassName, $classConfiguration['className']);
         }
     }
 }
 /**
  * Init
  *
  * @return void
  */
 public function initialize()
 {
     $this->piVars = GeneralUtility::_GP('tx_powermail_pi1');
     $this->contentObjectRenderer = $this->objectManager->get('TYPO3\\CMS\\Frontend\\ContentObject\\ContentObjectRenderer');
     $typoScriptSetup = $this->configurationManager->getConfiguration(ConfigurationManagerInterface::CONFIGURATION_TYPE_FULL_TYPOSCRIPT);
     $this->settings = $typoScriptSetup['plugin.']['tx_powermail.']['settings.']['setup.'];
 }
예제 #26
0
 /**
  * Copies the specified parseFunc configuration to $GLOBALS['TSFE']->tmpl->setup in Backend mode
  * This somewhat hacky work around is currently needed because the parseFunc() function of \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer relies on those variables to be set
  *
  * @return void
  */
 protected function simulateFrontendEnvironment()
 {
     $this->tsfeBackup = isset($GLOBALS['TSFE']) ? $GLOBALS['TSFE'] : NULL;
     $GLOBALS['TSFE'] = new \stdClass();
     $GLOBALS['TSFE']->tmpl = new \stdClass();
     $GLOBALS['TSFE']->tmpl->setup = $this->configurationManager->getConfiguration(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::CONFIGURATION_TYPE_FULL_TYPOSCRIPT);
 }
예제 #27
0
 /**
  * Renders a record list as known from the TYPO3 list module
  * Note: This feature is experimental!
  *
  * @param string $tableName name of the database table
  * @param array $fieldList list of fields to be displayed. If empty, only the title column (configured in $TCA[$tableName]['ctrl']['title']) is shown
  * @param int $storagePid by default, records are fetched from the storage PID configured in persistence.storagePid. With this argument, the storage PID can be overwritten
  * @param int $levels corresponds to the level selector of the TYPO3 list module. By default only records from the current storagePid are fetched
  * @param string $filter corresponds to the "Search String" textbox of the TYPO3 list module. If not empty, only records matching the string will be fetched
  * @param int $recordsPerPage amount of records to be displayed at once. Defaults to $TCA[$tableName]['interface']['maxSingleDBListItems'] or (if that's not set) to 100
  * @param string $sortField table field to sort the results by
  * @param bool $sortDescending if TRUE records will be sorted in descending order
  * @param bool $readOnly if TRUE, the edit icons won't be shown. Otherwise edit icons will be shown, if the current BE user has edit rights for the specified table!
  * @param bool $enableClickMenu enables context menu
  * @param string $clickTitleMode one of "edit", "show" (only pages, tt_content), "info
  * @param bool $alternateBackgroundColors Deprecated since TYPO3 CMS 7, will be removed in TYPO3 CMS 8
  * @return string the rendered record list
  * @see \TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList
  */
 public function render($tableName, array $fieldList = array(), $storagePid = NULL, $levels = 0, $filter = '', $recordsPerPage = 0, $sortField = '', $sortDescending = FALSE, $readOnly = FALSE, $enableClickMenu = TRUE, $clickTitleMode = NULL, $alternateBackgroundColors = FALSE)
 {
     if ($alternateBackgroundColors) {
         \TYPO3\CMS\Core\Utility\GeneralUtility::deprecationLog('The option alternateBackgroundColors has no effect anymore and can be removed without problems. The parameter will be removed in TYPO3 CMS 8.');
     }
     $pageinfo = \TYPO3\CMS\Backend\Utility\BackendUtility::readPageAccess(\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('id'), $GLOBALS['BE_USER']->getPagePermsClause(1));
     /** @var $dblist \TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList */
     $dblist = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList::class);
     $dblist->backPath = $GLOBALS['BACK_PATH'];
     $dblist->pageRow = $pageinfo;
     if ($readOnly === FALSE) {
         $dblist->calcPerms = $GLOBALS['BE_USER']->calcPerms($pageinfo);
     }
     $dblist->showClipboard = FALSE;
     $dblist->disableSingleTableView = TRUE;
     $dblist->clickTitleMode = $clickTitleMode;
     $dblist->clickMenuEnabled = $enableClickMenu;
     if ($storagePid === NULL) {
         $frameworkConfiguration = $this->configurationManager->getConfiguration(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK);
         $storagePid = $frameworkConfiguration['persistence']['storagePid'];
     }
     $dblist->start($storagePid, $tableName, (int) \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('pointer'), $filter, $levels, $recordsPerPage);
     $dblist->allFields = TRUE;
     $dblist->dontShowClipControlPanels = TRUE;
     $dblist->displayFields = FALSE;
     $dblist->setFields = array($tableName => $fieldList);
     $dblist->noControlPanels = TRUE;
     $dblist->sortField = $sortField;
     $dblist->sortRev = $sortDescending;
     $dblist->script = $_SERVER['REQUEST_URI'];
     $dblist->generateList();
     return $dblist->HTMLcode;
 }
 /**
  * Initialize
  *
  * @return void
  */
 public function initializeFinisher()
 {
     $this->contentObject = $this->configurationManager->getContentObject();
     $this->contentObject->start($this->mailRepository->getVariablesWithMarkersFromMail($this->mail));
     $typoScript = $this->configurationManager->getConfiguration(ConfigurationManagerInterface::CONFIGURATION_TYPE_FULL_TYPOSCRIPT);
     $this->configuration = $typoScript['plugin.']['tx_powermail.']['settings.']['setup.']['marketing.']['sendPost.'];
 }
예제 #29
0
 /**
  * Injects the Configuration Manager and is initializing the framework settings
  *
  * @param \TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface $configurationManager Instance of the Configuration Manager
  * @return void
  */
 public function injectConfigurationManager(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface $configurationManager)
 {
     $this->configurationManager = $configurationManager;
     $tsSettings = $this->configurationManager->getConfiguration(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK, 'news', 'news_pi1');
     $originalSettings = $this->configurationManager->getConfiguration(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::CONFIGURATION_TYPE_SETTINGS);
     // Use stdWrap for given defined settings
     if (isset($originalSettings['useStdWrap']) && !empty($originalSettings['useStdWrap'])) {
         /** @var  \TYPO3\CMS\Extbase\Service\TypoScriptService $typoScriptService */
         $typoScriptService = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Service\\TypoScriptService');
         $typoScriptArray = $typoScriptService->convertPlainArrayToTypoScriptArray($originalSettings);
         $stdWrapProperties = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $originalSettings['useStdWrap'], TRUE);
         foreach ($stdWrapProperties as $key) {
             if (is_array($typoScriptArray[$key . '.'])) {
                 $originalSettings[$key] = $this->configurationManager->getContentObject()->stdWrap($originalSettings[$key], $typoScriptArray[$key . '.']);
             }
         }
     }
     // start override
     if (isset($tsSettings['settings']['overrideFlexformSettingsIfEmpty'])) {
         /** @var Tx_MooxNews_Utility_TypoScript $typoScriptUtility */
         $typoScriptUtility = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('Tx_MooxNews_Utility_TypoScript');
         $originalSettings = $typoScriptUtility->override($originalSettings, $tsSettings);
     }
     $this->settings = $originalSettings;
 }
예제 #30
0
 /**
  * Injects the Configuration Manager and is initializing the framework settings
  *
  * @param \TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface $configurationManager Instance of the Configuration Manager
  * @return void
  */
 public function injectConfigurationManager(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface $configurationManager)
 {
     $this->configurationManager = $configurationManager;
     $tsSettings = $this->configurationManager->getConfiguration(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK, 'news', 'news_pi1');
     $originalSettings = $this->configurationManager->getConfiguration(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::CONFIGURATION_TYPE_SETTINGS);
     $propertiesNotAllowedViaFlexForms = ['orderByAllowed'];
     foreach ($propertiesNotAllowedViaFlexForms as $property) {
         $originalSettings[$property] = $tsSettings['settings'][$property];
     }
     // Use stdWrap for given defined settings
     if (isset($originalSettings['useStdWrap']) && !empty($originalSettings['useStdWrap'])) {
         /** @var  \TYPO3\CMS\Extbase\Service\TypoScriptService $typoScriptService */
         $typoScriptService = GeneralUtility::makeInstance(\TYPO3\CMS\Extbase\Service\TypoScriptService::class);
         $typoScriptArray = $typoScriptService->convertPlainArrayToTypoScriptArray($originalSettings);
         $stdWrapProperties = GeneralUtility::trimExplode(',', $originalSettings['useStdWrap'], true);
         foreach ($stdWrapProperties as $key) {
             if (is_array($typoScriptArray[$key . '.'])) {
                 $originalSettings[$key] = $this->configurationManager->getContentObject()->stdWrap($originalSettings[$key], $typoScriptArray[$key . '.']);
             }
         }
     }
     // start override
     if (isset($tsSettings['settings']['overrideFlexformSettingsIfEmpty'])) {
         /** @var \GeorgRinger\News\Utility\TypoScript $typoScriptUtility */
         $typoScriptUtility = GeneralUtility::makeInstance(\GeorgRinger\News\Utility\TypoScript::class);
         $originalSettings = $typoScriptUtility->override($originalSettings, $tsSettings);
     }
     $this->settings = $originalSettings;
 }