Returns the parent of the product.

@VirtualProperty
@SerializedName("parent")

@return ProductInterface The parent of the product
497556
public function getParent()
    {
        $parent = $this->entity->getParent();

        if (!$parent) {
            return null;
        }

        return $this->productFactory->createApiEntity($parent, $this->locale);
    }
189658
public function getParents()
    {
        if (!$this->parents) {
            $groups = wei()->group->getGroupsFromCache();

            $parents = wei()->groupModel()->beColl();
            $parents[] = $this;

            $group = $this;
            while ($group->parentId) {
                $group = $groups[$group->parentId];
                $parents[] = $group;
            }

            $this->parents = $parents;
        }

        return $this->parents;
    }
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);
    }
1312241
public function get_parent() {
        if ($this->lf->get_filepath() === '/' and $this->lf->is_directory()) {
            if ($this->areaonly) {
                return null;
            } else if ($this->itemidused) {
                return $this->browser->get_file_info($this->context, $this->lf->get_component(), $this->lf->get_filearea());
            } else {
                return $this->browser->get_file_info($this->context);
            }
        }

        if (!$this->lf->is_directory()) {
            return $this->browser->get_file_info($this->context, $this->lf->get_component(), $this->lf->get_filearea(), $this->lf->get_itemid(), $this->lf->get_filepath(), '.');
        }

        $filepath = $this->lf->get_filepath();
        $filepath = trim($filepath, '/');
        $dirs = explode('/', $filepath);
        array_pop($dirs);
        $filepath = implode('/', $dirs);
        $filepath = ($filepath === '') ? '/' : "/$filepath/";

        return $this->browser->get_file_info($this->context, $this->lf->get_component(), $this->lf->get_filearea(), $this->lf->get_itemid(), $filepath, '.');
    }
115138
public function getParentAttribute()
    {
        $parentClass = $this->block->parent_type;
        return $parentClass::find($this->block->parent_id);
    }
0
protected function parentId()
	{
		switch ( $this->position )
		{
			case 'root':
				return null;

			case 'child':
				return $this->target->getKey();

			default:
				return $this->target->getParentId();
		}
	}
630772
public function getParent() {

		$pageClass = Yii::$app->cms->getPageClass( $this->type );

		return $this->hasOne( $pageClass, [ 'id' => 'parentId' ] );
	}
126989
public function parent()
    {
        if (!$this->extend) {
            return null;
        }

        if (!$this->parent) {
            $this->parent = $this->createSelf();

            $this->parent->render($this->extend, $this->data);
        }

        return $this->parent->getBlock($this->currentBlock);
    }
1214180
protected function determineParentTariff()
    {
        if ($this->tariff === null) {
            if (!empty($this->parent_id)) {
                return $this->parent_id;
            }

            return null;
        }

        if ($this->tariff->parent_id !== null) {
            return $this->tariff->parent_id;
        }

        return $this->tariff->id;
    }
931143
public function getParentId()
    {
        return (is_string($this->parentAttribute) && !empty($this->parentAttribute)) ?
        $this->{$this->parentAttribute} : null;
    }
1250087
public function getOwnInterfaces()
    {
        $parent = $this->getParentClass();
        if ($parent !== false) {
            return array_diff_key($this->getInterfaces(), $parent->getInterfaces());
        } else {
            return $this->getInterfaces();
        }
    }
320268
public function getParent()
    {
        if ($this->isRoot()) {
            return null;
        }

        return substr($this->subject->getFullPath(), 0, strrpos($this->subject->getFullPath(), '/'));
    }
317951
public function getParentEntityDescriptor()
    {
        if (is_null($this->parentEntityDescriptor)) {
            $this->setParentEntityDescriptor(
                EntityDescriptorRegistry::getInstance()
                    ->getDescriptorFor($this->parentEntity)
            );
        }
        return $this->parentEntityDescriptor;
    }
760341
public function &GetPrimaryCategory()
    {
        $oCategory = null;
        // if this is a variant, then we want to take the parent object instead - at least if no data is set for the child
        if (!empty($this->fieldShopCategoryId)) {
            $oCategory = &$this->GetFieldShopCategory();
            if (!is_null($oCategory) && false == $oCategory->AllowDisplayInShop()) {
                $oCategory = null;
            }
        }

        if (is_null($oCategory)) {
            $oCategories = &$this->GetFieldShopCategoryList();
            $oCategories->GoToStart();
            if ($oCategories->Length() > 0) {
                $oCategory = &$oCategories->Current();
            }
        }
        if (is_null($oCategory) && $this->IsVariant()) {
            $oParent = &$this->GetFieldVariantParent();
            $oCategory = &$oParent->GetPrimaryCategory();
        }

        return $oCategory;
    }
734684
public function getParent()
    {
        $account = $this->entity->getParent();
        if ($account) {
            return new self($account, $this->locale);
        }

        return;
    }
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;
    }
29829
public function getParent()
    {
        $parent = $this->getEntity()->getParent();
        if ($parent) {
            return new self($parent, $this->locale);
        }

        return;
    }