protected function resolve($name, $options = null)
    {
        $widget = $this->getService($name);
        $wDefinition = $widget->getDefinition();

        if (is_array($wDefinition) && !$widget->isResolved()) {

            if (isset($wDefinition['path']) && !class_exists($wDefinition['className'], false)) {
                include_once $wDefinition['path'];
            }

            if (isset($wDefinition['options'])) {
                $options = array_merge($wDefinition['options'], $options);
            }
        }

        $instance = $widget->resolve([$options], $this->getDI());

        if ($instance instanceof InjectionAwareInterface) {
            $instance->setDI($this->getDI());
        }

        return $instance;
    }