Returns the model target.

@return \core_analytics\local\target\base
439532
public function get_target() {
        if ($this->target !== null) {
            return $this->target;
        }
        $instance = \core_analytics\manager::get_target($this->model->target);
        $this->target = $instance;

        return $this->target;
    }
222249
private function getTarget() {
        $this->name = str_replace('Asset', '', class_basename(static::class));
        $name       = $this->name;
        if ( ! empty($this->cacheFolder)) {
            $name = $this->cacheFolder;
        }
        
        $cacheName = trim(config('asset.public_cache_folder'), '/');
        
        $this->target = '/' . $cacheName . '/' . studly_case($name) . '/';
    }
1034697
public function getSubDomainModel()
    {
        if ( null === $this->_subDomainModel )
        {
            $this->_subDomainModel = $this->getServiceLocator()
                                          ->get( 'Grid\Core\Model\SubDomain\Model' );
        }

        return $this->_subDomainModel;
    }
1048576
public function parentModel()
    {
        if ($this->value
            && ($relation = $this->guessRelation())
            && ($model = $this->getModel())
            && method_exists($model, $relation)) {
            return $model->$relation;
        }
    }
62614
public function getModelClass()
    {
        $model = $this->getModelNamespace() . '\\' . $this->getModelBaseClass();

        // Validate the model class.
        $this->validateModelClass($model);

        return $model;
    }
704532
public function target()
    {
        $xref = trim($this->value(), '@');
        switch ($this->tag) {
            case 'FAMC':
            case 'FAMS':
                return Family::getInstance($xref, $this->record()->tree());
            case 'HUSB':
            case 'WIFE':
            case 'CHIL':
                return Individual::getInstance($xref, $this->record()->tree());
            case 'SOUR':
                return Source::getInstance($xref, $this->record()->tree());
            case 'OBJE':
                return Media::getInstance($xref, $this->record()->tree());
            case 'REPO':
                return Repository::getInstance($xref, $this->record()->tree());
            case 'NOTE':
                return Note::getInstance($xref, $this->record()->tree());
            default:
                return GedcomRecord::getInstance($xref, $this->record()->tree());
        }
    }
1124327
protected function makeTargetsForAllAttributes()
    {
        $modelInfo = $this->getModelInformation();

        if ( ! $modelInfo) {
            // @codeCoverageIgnoreStart
            return [];
            // @codeCoverageIgnoreEnd
        }

        $targets = [];

        foreach ($modelInfo->attributes as $key => $attribute) {
            if ( ! $this->isAttributeRelevant($attribute)) continue;

            $targets[] = $this->parseTarget($key);
        }

        return $targets;
    }
84577
public function parent()
    {
        return $this->filter([
            'lft__lt' => $this->getModel()->lft,
            'rgt__gt' => $this->getModel()->rgt,
            'level' => $this->getModel()->level - 1,
            'root' => $this->getModel()->root,
        ]);
    }
1198647
public static function get_all_targets() : array {
        if (self::$alltargets !== null) {
            return self::$alltargets;
        }

        $classes = self::get_analytics_classes('target');

        self::$alltargets = [];
        foreach ($classes as $fullclassname => $classpath) {
            $instance = self::get_target($fullclassname);
            if ($instance) {
                self::$alltargets[$instance->get_id()] = $instance;
            }
        }

        return self::$alltargets;
    }
447537
public function targetStore() {
		if ($this->owner->ParentID) {
			$store = $this->owner->Parent()->getCDNStore();
			return $store;
		}

		return $this->contentService->getDefaultStore();
	}
1150980
public function getTarget(OperationContextInterface $context = null)
    {
        $context = $this->ensureContext($context);
        $targetId = $this->getTargetId();
        if ($targetId === null) {
            return null;
        }

        return $this->getSession()->getObject($targetId, $context);
    }
675348
public function getBaseClass()
    {
        if ($this->isAlias() && $this->baseClass === null) {
            return $this->alias;
        } elseif ($this->baseClass === null) {
            return $this->getDatabase()->getBaseClass();
        } else {
            return $this->baseClass;
        }
    }
1355195
public function getModel()
    {
        if (is_null($this->_model)) {
            $modelClass = $this->modelClass;
            $this->_model = new $modelClass();
        }

        return $this->_model;
    }
400367
public function getSource()
    {
        $targets = array_map('strtolower', $this->getTargets());
        $nick = strtolower($this->getConnection()->getNickname());
        if (in_array($nick, $targets)) {
            return $this->getNick();
        }
        return reset($targets);
    }
841940
def get_base(self):
    
    if self._type == 'query':
      return self._observable.get_query_base()
    return self._observable.get_target_base()
373266
public function getModelClass()
    {
        if (isset($this->parent)) {
            return $this->parent->getModelClass();
        }

        if (isset($this->getCollection()->first)) {
            return $this->getCollection()->first->class;
        }

        return get_class($this->getCollection()->getModel());
    }
888567
protected function getModelInformation()
    {
        if (null === $this->model) {
            // @codeCoverageIgnoreStart
            return false;
            // @codeCoverageIgnoreEnd
        }

        return $this->getModelInformationRepository()->getByModel($this->model);
    }