public function buildPropertyInjectionCodeByConfigurationTypeAndPath(Configuration $objectConfiguration, $propertyName, $configurationType, $configurationPath = null)
    {
        $className = $objectConfiguration->getClassName();
        if ($configurationPath !== null) {
            $preparedSetterArgument = '\Neos\Flow\Core\Bootstrap::$staticObjectManager->get(\Neos\Flow\Configuration\ConfigurationManager::class)->getConfiguration(\'' . $configurationType . '\', \'' . $configurationPath . '\')';
        } else {
            $preparedSetterArgument = '\Neos\Flow\Core\Bootstrap::$staticObjectManager->get(\Neos\Flow\Configuration\ConfigurationManager::class)->getConfiguration(\'' . $configurationType . '\')';
        }

        $result = $this->buildSetterInjectionCode($className, $propertyName, $preparedSetterArgument);
        if ($result !== null) {
            return $result;
        }
        return ['    $this->' . $propertyName . ' = ' . $preparedSetterArgument . ';'];
    }
public function buildPropertyInjectionCodeByConfigurationTypeAndPath(Configuration $objectConfiguration, $propertyName, $configurationType, $configurationPath = null)
    {
        $className = $objectConfiguration->getClassName();
        if ($configurationPath !== null) {
            $preparedSetterArgument = '\Neos\Flow\Core\Bootstrap::$staticObjectManager->get(\Neos\Flow\Configuration\ConfigurationManager::class)->getConfiguration(\'' . $configurationType . '\', \'' . $configurationPath . '\')';
        } else {
            $preparedSetterArgument = '\Neos\Flow\Core\Bootstrap::$staticObjectManager->get(\Neos\Flow\Configuration\ConfigurationManager::class)->getConfiguration(\'' . $configurationType . '\')';
        }

        $result = $this->buildSetterInjectionCode($className, $propertyName, $preparedSetterArgument);
        if ($result !== null) {
            return $result;
        }
        return ['    $this->' . $propertyName . ' = ' . $preparedSetterArgument . ';'];
    }
public function buildPropertyInjectionCodeByConfigurationTypeAndPath ( Configuration $ objectConfiguration , $ propertyName , $ configurationType , $ configurationPath = null ) { $ className = $ objectConfiguration -> getClassName ( ) ; if ( $ configurationPath !== null ) { $ preparedSetterArgument = '\Neos\Flow\Core\Bootstrap::$staticObjectManager->get(\Neos\Flow\Configuration\ConfigurationManager::class)->getConfiguration(\'' . $ configurationType . '\', \'' . $ configurationPath . '\')' ; } else { $ preparedSetterArgument = '\Neos\Flow\Core\Bootstrap::$staticObjectManager->get(\Neos\Flow\Configuration\ConfigurationManager::class)->getConfiguration(\'' . $ configurationType . '\')' ; } $ result = $ this -> buildSetterInjectionCode ( $ className , $ propertyName , $ preparedSetterArgument ) ; if ( $ result !== null ) { return $ result ; } return [ '    $this->' . $ propertyName . ' = ' . $ preparedSetterArgument . ';' ] ; }
Builds code which assigns the value stored in the specified configuration into the given class property.

@param Configuration $objectConfiguration Configuration of the object to inject into
@param string $propertyName Name of the property to inject
@param string $configurationType the configuration type of the injected property (one of the ConfigurationManager::CONFIGURATION_TYPE_* constants)
@param string $configurationPath Path with "." as separator specifying the setting value to inject or NULL if the complete configuration array should be injected
@return array PHP code
Builds code which assigns the value stored in the specified configuration into the given class property .