protected function resolveOutputType($type)
    {
        if ($this->propertyInputFactory()->isResolvable($type)) {
            $this->setInputType($type);
            return static::PROPERTY_CONTROL;
        } elseif ($this->propertyDisplayFactory()->isResolvable($type)) {
            $this->setDisplayType($type);
            return static::PROPERTY_DISPLAY;
        } else {
            throw new InvalidArgumentException(sprintf(
                'Invalid form property output type, received %s',
                is_object($type) ? get_class($type) : gettype($type)
            ));
        }
    }