Return loaded parent

@return \OxidEsales\Eshop\Core\Theme
508678
public function getParent()
    {
        $sParent = $this->getInfo('parentTheme');
        if (!$sParent) {
            return null;
        }
        $oTheme = oxNew(\OxidEsales\Eshop\Core\Theme::class);
        if ($oTheme->load($sParent)) {
            return $oTheme;
        }

        return null;
    }
437214
public function getParentRepository()
    {
        if (null == $this->parentRepository) {
            $this->setParentRepository(
                Orm::getRepository($this->getParentEntity())
            );
        }
        return $this->parentRepository;
    }
1107057
public function getMenu()
    {
        if (!$this->menu) {

            foreach ($this->getAllMenus() as $menu) {
                $menu->configureTopMenu($this);
            }
        }

        return parent::getMenu();
    }
933962
public function get_parent_themes($theme_name)
	{
		$return = array($this->create_theme_array($theme_name));
		$theme_info = $this->load_info($theme_name);

		if ( ! empty($theme_info['parent']))
		{
			$return = array_merge($return, $this->get_parent_themes($theme_info['parent']));
		}
		elseif($theme_name !== $this->fallback['name'])
		{
			$return[] = $this->fallback;
		}

		return $return;
	}
497556
public function getParent()
    {
        $parent = $this->entity->getParent();

        if (!$parent) {
            return null;
        }

        return $this->productFactory->createApiEntity($parent, $this->locale);
    }
754553
public function getParent()
    {
        $parentID = $this->getField("ParentID");
        if ($parentID) {
            return SiteTree::get_by_id(self::class, $parentID);
        }
        return null;
    }
507367
public function getParents()
    {
        $parents = $this()->beColl();

        $category = $this;
        while ($parent = $category->getParent()->find()) {
            $parents[] = $category = $parent;
        }

        return $parents;
    }
224277
public function getDefaultParent()
    {
        if ($defaultParents = $this->config()->default_parents) {
            
            if (isset($defaultParents[$this->getClass()])) {
                
                $result = $this->processValue($defaultParents[$this->getClass()]);
                
                if ($result instanceof DataObject) {
                    return $result->ID;
                }
                
                return $result;
                
            }
            
        }
    }
606706
public function getSharedComponent()
    {
        switch ($this->parentPropertyName) {
            case 'endColor':
                return $this->parent->getSharedComponent()->getEndColor();
            case 'color':
                return $this->parent->getSharedComponent()->getColor();
            case 'startColor':
                return $this->parent->getSharedComponent()->getStartColor();
        }
    }
127651
public function topParent()
    {
        $topParent = $this->parent();

        if (!$topParent) {
            return null;
        }

        while (true) {
            $theParent = $topParent->parent();
            if ($theParent !== null && $theParent->parent() !== null) {
                $topParent = $theParent;
            } else {
                break;
            }
        }

        return $topParent;
    }
1172040
private function ParentItem()
    {
        $this->parent = $this->GetTreeItem('parent');
        return $this->parent->Exists() ? $this->parent : null;
    }
540781
public function getThemeEnabled()
    {
        $plugins = $this->getLoadedPlugins();

        $theme = false;
        foreach ($plugins as $plugin) {
            /* @var $plugin Plugin */
            if ($plugin->isTheme()
                && $this->isPluginActivated($plugin->getPluginName())
            ) {
                if ($plugin->getPluginName() != self::DEFAULT_THEME) {
                    return $plugin; // enabled theme (not default)
                }
                $theme = $plugin; // default theme
            }
        }
        return $theme;
    }
985298
public function getPlacement()
    {
        if (($parent = $this->getParent()) && $parent->Placement) {
            return $parent->Placement;
        }
        
        return $this->config()->default_placement;
    }
927529
public function getParent()
    {
        return $this->BaseClass && $this->ParentID
            ? DataObject::get_by_id($this->BaseClass, $this->ParentID, true)
            : null;
    }
1180640
public function getParentOrRoot() {
		if(DEBUG_LOG_BITEMS){
			BLog::addToLog('[Items.ItemTree.'.$this->tableName.']: Try to get parent / root element.');
			}
		$parent = $this->getParent();
		if(!empty($parent)){
			return $parent;
			}
		//return $fparent;
		if(DEBUG_LOG_BITEMS){
			BLog::addToLog('[Items.ItemTree.'.$this->tableName.']: Parent is empty. Trying to get root from collection.');
			}
		$collection = $this->getCollection();
		if(empty($collection)){
			return NULL;
			}
		if(DEBUG_LOG_BITEMS){
			BLog::addToLog('[Items.ItemTree.'.$this->tableName.']: Parent is empty. Collection is not empty. Calling getGroupRoot.');
			}
		$groupRoot = $collection->getGroupRoot($this->getGroupId());
		if(DEBUG_LOG_BITEMS){
			BLog::addToLog('[Items.ItemTree.'.$this->tableName.']: Got getGroupRoot!');
			}
		return $groupRoot;
		}
1006938
public function parent() {
        $path = $this->path;

        array_pop($path);

        if (empty($path)) {
            throw new \RuntimeException("Can't get parent of root path");
        }

        return new static($path);
    }
581078
public function getRoot()
    {
        $next_parent = $this->getParent();
        $parent = null;
        while ($next_parent) {
            $parent = $next_parent;
            $next_parent = $parent->getParent();
        }

        return $parent ? $parent : $this;
    }