public function supports(Request $request, ArgumentMetadata $argument): bool
    {
        if (!$this->scopeMatcher->isContaoRequest($request)) {
            return false;
        }

        $this->framework->initialize();

        if (!is_a($argument->getType(), Model::class, true)) {
            return false;
        }

        if (!$argument->isNullable() && null === $this->fetchModel($request, $argument)) {
            return false;
        }

        return true;
    }
public function supports(Request $request, ArgumentMetadata $argument): bool
    {
        if (!$this->scopeMatcher->isContaoRequest($request)) {
            return false;
        }

        $this->framework->initialize();

        if (!is_a($argument->getType(), Model::class, true)) {
            return false;
        }

        if (!$argument->isNullable() && null === $this->fetchModel($request, $argument)) {
            return false;
        }

        return true;
    }
public function supports ( Request $ request , ArgumentMetadata $ argument ) : bool { if ( ! $ this -> scopeMatcher -> isContaoRequest ( $ request ) ) { return false ; } $ this -> framework -> initialize ( ) ; if ( ! is_a ( $ argument -> getType ( ) , Model :: class , true ) ) { return false ; } if ( ! $ argument -> isNullable ( ) && null === $ this -> fetchModel ( $ request , $ argument ) ) { return false ; } return true ; }
{@inheritdoc}
{