Webiny\Component\StdLib\ComponentTrait::getConfig PHP Method

getConfig() public static method

Returns the current component configuration.
public static getConfig ( ) : ConfigObject
return Webiny\Component\Config\ConfigObject
    public static function getConfig()
    {
        if (!is_object(self::$componentConfig)) {
            $config = [];
            // check if we have default config
            if (isset(self::$defaultConfig)) {
                $config = self::$defaultConfig;
            }
            self::$componentConfig = new ConfigObject($config);
        }
        return self::$componentConfig;
    }