protected function registerExtensions(array $config)
    {
        foreach ($config as $entry) {

            // Parse config entry values
            $name = ArrayHelper::getValue($entry, 'name', false);
            $options = ArrayHelper::getValue($entry, 'options', '');
            $depends = ArrayHelper::getValue($entry, 'depends', []);

            // If extension is enabled
            if (in_array($name, $this->enabledExtensions)) {

                // Make sure dependencies are met
                if (!$this->checkEnabledExtensions($depends)) {
                    throw new InvalidConfigException(
                        "Extension {$name} requires " . implode(', ', $depends) . " extensions to be enabled."
                    );
                }

                // Register extension
                $options = Json::encode($options);
                $this->view->registerJs(
                    "{$this->id}_ias.extension(new {$name}({$options}));",
                    View::POS_READY,
                    "{$this->id}_ias_{$name}"
                );
            }
        }
    }