Inject a helper instance with the registered view

@param  $helper fix issue: Removed ViewHelperInterface cause not every helper implement it (Look at PaginationControl).
Let validatePlugin do the work for us.
@return void
179627
public function injectView($helper)
    {
        $view = $this->getView();
        if (null === $view) {
            return;
        }
        $helper->setView($view);
    }
20495
protected function _addTemplates(FormHelper $formHelper)
    {
        if (!static::cache('bootstrapTemplates')) {
            $formHelper->templates($this->_templates);
            static::cache('bootstrapTemplates', true);
        }
    }
988276
function setRenderer($renderer)
    {
        if (!$renderer instanceof iViewRenderer && !is_callable($renderer))
            throw new \InvalidArgumentException(sprintf(
                'Renderer must extend of (iViewRenderer) or callable. given: (%s)'
                , \Poirot\Std\flatten($renderer)
            ));

        $this->renderer = $renderer;
        return $this;
    }
127825
public function subscribe($subscriber)
    {
        list($className, $method) = Str::parseCallback($subscriber, 'subscribe');

        $instance = $this->container->make($className);

        call_user_func_array([$instance, $method], [$this]);
    }
966656
public function addPlugin(PluginInterface $plugin)
    {
        $this->plugins[] = $plugin;

        $plugin->activate($this->eventDispatcher);

        if ($plugin instanceof EventSubscriberInterface) {
            $this->eventDispatcher->addSubscriber($plugin);
        }
    }
365749
protected function _setValidator($validator)
    {
        if (!is_null($validator) && !($validator instanceof ValidatorInterface)) {
            throw $this->_createInvalidArgumentException($this->__('Invalid validator'), null, null, $validator);
        }

        $this->validator = $validator;
    }
1215297
public function helper($helper)
    {
        if (isset($this->aliases[$helper])) {
            $helper = $this->aliases[$helper];
        }

        $helper = $this->normalizeName($helper);

        $args = func_get_args();
        $args[0] = $helper;

        return call_user_func_array([$this->factory, 'helper'], $args);
    }
1145547
private function getUrlHelper() : UrlHelper
    {
        if (null === $this->urlHelper) {
            $this->urlHelper = new UrlHelper(new View());
        }

        return $this->urlHelper;
    }
981363
protected function setViewHelpers()
    {
        $this->set('token', $this->app->make('token'));
        $this->set('form', $this->app->make('helper/form'));
        $this->set('ui', $this->app->make('helper/concrete/ui'));
        $this->set('resolverManager', $this->app->make(ResolverManagerInterface::class));
    }
7210
public function setHelperPluginManager($helpers)
    {
        if (is_string($helpers)) {
            if (!class_exists($helpers)) {
                throw new Exception\InvalidArgumentException(sprintf(
                    'Invalid helper helpers class provided (%s)',
                    $helpers
                ));
            }
            $helpers = new $helpers();
        }
        if (!$helpers instanceof HelperPluginManager) {
            throw new Exception\InvalidArgumentException(sprintf(
                'Helper helpers must extend HumusMvc\View\HelperPluginManager; got type "%s" instead',
                (is_object($helpers) ? get_class($helpers) : gettype($helpers))
            ));
        }
        $helpers->setView($this);
        $this->_helpers = $helpers;

        return $this;
    }
858717
public function configure(ResolverInterface $resolver): void
    {
        $resolver->type(Type::CALLABLE)
            ->validator(function (array $method) {
                return $this->validate($method);
            }, Type::ARRAY);
    }
779141
public function getHelper($helper, $params=array())
    {
        parent::getHelper($helper, $params);

        $viewHelper = new $this->_helperClassName();

        $viewHelper->setParams($params);
        $viewHelper->setRouter($this->_router);

        return $viewHelper;
    }
1017659
protected function addFormObjectNameToViewHelperVariableContainer()
    {
        $formObjectName = $this->getFormObjectName();
        if ($formObjectName !== null) {
            $this->viewHelperVariableContainer->add(\Neos\FluidAdaptor\ViewHelpers\FormViewHelper::class, 'formObjectName', $formObjectName);
        }
    }
788451
public function withValidator($validator): void
    {
        $user = $this->user($this->route('guard'));

        $validator->after(function ($validator) use ($user) {
            if (! $user->phone || ! $user->hasVerifiedPhone()) {
                $validator->errors()->add('phone', trans('cortex/auth::messages.account.'.(! $user->phone ? 'phone_field_required' : 'phone_verification_required')));
            }
        });
    }
1282181
public function onAdd(ViewInterface $view)
    {
        if (!$view instanceof TwigView) {
            throw new \InvalidArgumentException("This plugin only works with a Twig view");
        }
        
        foreach ($this->extensions as $class) {
            if (class_exists($class)) {
                $view->getTwig()->addExtension(new $class());
            }
        }
    }
1293348
public function withValidator($validator): void
    {
        $validator->after(function ($validator) {
            if (! auth()->guard($this->route('guard'))->getProvider()->validateCredentials($this->user($this->route('guard')), ['password' => $this->get('old_password')])) {
                $validator->errors()->add('old_password', trans('cortex/auth::messages.account.wrong_password'));
            }

            if (auth()->guard($this->route('guard'))->getProvider()->validateCredentials($this->user($this->route('guard')), ['password' => $this->get('new_password')])) {
                $validator->errors()->add('new_password', trans('cortex/auth::messages.account.different_password'));
            }
        });
    }
590971
public function init(): void
    {
        if ($this->initialized) {
            return;
        }
        if (!$this->view) {
            $containerGetter = 'get' . ucfirst($this->viewName);
            $this->setView(Container::$containerGetter());
        }
        if (method_exists($this, 'getAvailableHelpers')) {
            $this->registerHelpers($this->getAvailableHelpers());
        }
        
        $this->initialized = true;
    }