public function createView($viewType)
    {
        if (class_exists($viewType)) {
            $reflectionClass = new \ReflectionClass($viewType);

            if ($reflectionClass->implementsInterface(AjaxViewInterface::class)) {
                return $reflectionClass->newInstance();
            }
        }

        throw new AjaxModalsException("View type $viewType does not exists.");
    }
public function createView($viewType)
    {
        if (class_exists($viewType)) {
            $reflectionClass = new \ReflectionClass($viewType);

            if ($reflectionClass->implementsInterface(AjaxViewInterface::class)) {
                return $reflectionClass->newInstance();
            }
        }

        throw new AjaxModalsException("View type $viewType does not exists.");
    }
public function createView ( $ viewType ) { if ( class_exists ( $ viewType ) ) { $ reflectionClass = new \ ReflectionClass ( $ viewType ) ; if ( $ reflectionClass -> implementsInterface ( AjaxViewInterface :: class ) ) { return $ reflectionClass -> newInstance ( ) ; } } throw new AjaxModalsException ( "View type $viewType does not exists." ) ; }
Creates an AjaxView of the given type

@param string $viewType

@return AjaxViewInterface
Creates an AjaxView of the given type