Gets the parent content for which this content is a translation of.

@return mixed The parent content if exists, null otherwise
339876
public function parent()
    {
        if (!$this->has('slug')) {
            throw new FatalErrorException(__d('content', "Missing property 'slug', make sure to include it using Query::select()."));
        }

        return TableRegistry::get('Content.Contents')
            ->find()
            ->select(['id', 'slug', 'content_type_slug', 'language'])
            ->where([
                'id' => $this->translation_for,
                'status' => 1,
            ])
            ->first();
    }
439658
public function getParentTemplateFilename() {

		if(empty($this->parentTemplateFilename)) {
		
			if(preg_match($this->extendRex, $this->bufferInstance->__rawContents, $matches)) {

				$this->parentTemplateFilename = $matches[1];

			}
		}

		return $this->parentTemplateFilename;
		
	}
211067
public function getParentKey()
    {
        if ($this->owner->isRoot()) {
            return null;
        }
        $path = $this->getPath();
        return array_pop($path);
    }
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;
    }
542890
public function getParentClass()
    {
        $parentClass = $this->getBehaviorContent('parentClass');
        return null === $parentClass ? ($this->getTable()->getBaseQueryClass() != "" ? $this->getTable()->getBaseQueryClass() : 'ModelCriteria') : $parentClass;
    }
306666
private function getTranslation()
    {
        $filterTranslation = null;
        foreach ($this->entity->getTranslations() as $translation) {
            if ($translation->getLocale() == $this->locale) {
                $filterTranslation = $translation;
            }
        }
        if (!$filterTranslation) {
            $filterTranslation = new FilterTranslation();
            $filterTranslation->setLocale($this->locale);
            $filterTranslation->setFilter($this->entity);
            $this->entity->addTranslation($filterTranslation);
        }

        return $filterTranslation;
    }
104437
public function getParentCategory()
    {
        $parentCategory = null;
        $currentCategory = $this->getCurrentCategory();
        if (null !== $currentCategory) {
            $parentCategoryId = $currentCategory->getParentId();
            $parentCategory = $this->_categoryRepository->get(
                $parentCategoryId,
                $this->_storeManager->getStore()->getId()
            );
            if (null !== $parentCategory && 1 >= $parentCategory->getLevel()) {
                $parentCategory = null;
            }
        }
        return $parentCategory;
    }
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;
    }
653554
public function getParent()
    {
        if ($this->isRoot()) {
            return null;
        }

        $parentPath = $this->getParentPath();
        $node = $this->context->getFirstLevelNodeCache()->getByPath($parentPath);
        if ($node !== false) {
            return $node;
        }
        $node = $this->nodeDataRepository->findOneByPathInContext($parentPath, $this->context);
        $this->context->getFirstLevelNodeCache()->setByPath($parentPath, $node);

        return $node;
    }
285495
public function getTitle()
    {
        $title = null;

        if (isset($this->parent->title)) {
            $title = $this->parent->title;
        }

        return $title;
    }
168372
public function contentObject()
    {
        $contentID = $this->attribute( 'content_id' );
        //TODO:try to get the language id
        $languageID = $this->attribute( 'language_id' );
        return eZContentObject::fetch( $contentID );
    }
1123888
public function getDescription()
    {
        if ($this->description && strpos(strtolower((string) $this->description), '{@inheritdoc}') === false) {
            return $this->description;
        }

        $parentElement = $this->getInheritedElement();
        if ($parentElement instanceof self) {
            $parentDescription = $parentElement->getDescription();

            return $this->description
                ? str_ireplace('{@inheritdoc}', $parentDescription, $this->description)
                : $parentDescription;
        }

        return $this->description;
    }
958094
public function getParentClass()
    {
        return ($reflection = parent::getParentClass()) ? new self($reflection->getName(), $this->mapper, $this->entityReflectionProvider) : null;
    }
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, '.');
    }
300761
public function getNodeTranslationForSlug(
        $slug,
        NodeTranslation $parentNode = null
    ) {
        if (empty($slug)) {
            return $this->getNodeTranslationForSlugPart(null, $slug);
        }

        $slugParts = explode('/', $slug);
        $result = $parentNode;
        foreach ($slugParts as $slugPart) {
            $result = $this->getNodeTranslationForSlugPart($result, $slugPart);
        }

        return $result;
    }
703309
public function getMyToc()
    {
        $parent = $this->getParent();

        if ($parent) {
            foreach ($parent['tocs'] as $toc) {
                if (in_array($this->currentFileName, $toc)) {
                    $before = array();
                    $after = $toc;

                    while ($after) {
                        $file = array_shift($after);
                        if ($file == $this->currentFileName) {
                            return array($before, $after);
                        }
                        $before[] = $file;
                    }
                }
            }
        }

        return null;
    }
1069884
public function getContent($lang = null) {
		if (is_null($lang)) $lang = $this->_language;

		if ($this->_content == null) {
			$file = $this->_language_path . $lang . '/i18n.php';
			$this->_content = $this->_loadFile($file, false);
		}

		return $this->_content;
	}