FluidTYPO3\Vhs\Asset::getSettings PHP Méthode

getSettings() public méthode

Returns the settings used by this particular Asset during inclusion. Public access allows later inspection of the TypoScript values which were applied to the Asset.
public getSettings ( ) : array
Résultat array
    public function getSettings()
    {
        if (null === self::$settingsCache) {
            $allTypoScript = $this->configurationManager->getConfiguration(ConfigurationManagerInterface::CONFIGURATION_TYPE_FULL_TYPOSCRIPT);
            $settingsExist = isset($allTypoScript['plugin.']['tx_vhs.']['settings.']);
            if (true === $settingsExist) {
                self::$settingsCache = GeneralUtility::removeDotsFromTS($allTypoScript['plugin.']['tx_vhs.']['settings.']);
            }
        }
        $settings = (array) self::$settingsCache;
        $properties = get_class_vars(get_class($this));
        foreach (array_keys($properties) as $propertyName) {
            $properties[$propertyName] = $this->{$propertyName};
        }
        if (true === method_exists('TYPO3\\CMS\\Core\\Utility\\ArrayUtility', 'mergeRecursiveWithOverrule')) {
            ArrayUtility::mergeRecursiveWithOverrule($settings, $this->settings);
            ArrayUtility::mergeRecursiveWithOverrule($settings, $properties);
        } else {
            $settings = GeneralUtility::array_merge_recursive_overrule($settings, $this->settings);
            $settings = GeneralUtility::array_merge_recursive_overrule($settings, $properties);
        }
        return $settings;
    }