protected function setDynamicConfig(EntityInterface $dynConfig)
    {
        if ($this->dynamicConfig !== null) {
            throw new InvalidArgumentException(
                'Dynamic configset already assigned.'
            );
        }

        if ($this->appConfig !== null) {
            if ($dynConfig instanceof DelegatesAwareInterface) {
                $dynConfig->prependDelegate($this->appConfig);
            } else {
                $appConfig['dynamic'] = $dynConfig;
                $appConfig->prependDelegate($dynConfig);
            }
        }

        $this->dynamicConfig = $dynConfig;
        return $this;
    }