protected function getOtherModelClass()
    {
        $this->otherModelClass = array_get($this->actionData->options(), 'model');

        if ( ! $this->otherModelClass) {
            throw new UnexpectedValueException("No target model class set in options");
        }

        if ( ! is_a($this->otherModelClass, Model::class, true)) {
            throw new UnexpectedValueException("{$this->otherModelClass} is not a valid target model class");
        }

        /** @var ModelInformationRepositoryInterface $infoRepository */
        $infoRepository = app(ModelInformationRepositoryInterface::class);

        $info = $infoRepository->getByModelClass($this->otherModelClass);

        if ( ! $info) {
            throw new UnexpectedValueException("{$this->otherModelClass} is not a CMS model");
        }

        return $this->otherModelClass;
    }
protected function getOtherModelClass()
    {
        $this->otherModelClass = array_get($this->actionData->options(), 'model');

        if ( ! $this->otherModelClass) {
            throw new UnexpectedValueException("No target model class set in options");
        }

        if ( ! is_a($this->otherModelClass, Model::class, true)) {
            throw new UnexpectedValueException("{$this->otherModelClass} is not a valid target model class");
        }

        /** @var ModelInformationRepositoryInterface $infoRepository */
        $infoRepository = app(ModelInformationRepositoryInterface::class);

        $info = $infoRepository->getByModelClass($this->otherModelClass);

        if ( ! $info) {
            throw new UnexpectedValueException("{$this->otherModelClass} is not a CMS model");
        }

        return $this->otherModelClass;
    }
protected function getOtherModelClass ( ) { $ this -> otherModelClass = array_get ( $ this -> actionData -> options ( ) , 'model' ) ; if ( ! $ this -> otherModelClass ) { throw new UnexpectedValueException ( "No target model class set in options" ) ; } if ( ! is_a ( $ this -> otherModelClass , Model :: class , true ) ) { throw new UnexpectedValueException ( "{$this->otherModelClass} is not a valid target model class" ) ; } /** @var ModelInformationRepositoryInterface $infoRepository */ $ infoRepository = app ( ModelInformationRepositoryInterface :: class ) ; $ info = $ infoRepository -> getByModelClass ( $ this -> otherModelClass ) ; if ( ! $ info ) { throw new UnexpectedValueException ( "{$this->otherModelClass} is not a CMS model" ) ; } return $ this -> otherModelClass ; }
Returns the model FQN for the target model for the link.

If the relationship is MorphTo, we cannot know the model class in every case.

@return string
Returns the model FQN for the target model for the link .