Returns parent context

@return context
433974
public function get_parent_context() {
        if (empty($this->_path) or $this->_id == SYSCONTEXTID) {
            return false;
        }

        $parentcontexts = trim($this->_path, '/'); // kill leading slash
        $parentcontexts = explode('/', $parentcontexts);
        array_pop($parentcontexts); // self
        $contextid = array_pop($parentcontexts); // immediate parent

        return context::instance_by_id($contextid, MUST_EXIST);
    }
1136388
function() {
		var cur = this,
			child = this;

		while (cur._parent) {
			child = cur;
			cur = cur._parent;
		}

		if (cur._context instanceof TemplateContext) {
			cur = child;
		}
		return cur._context;
	}
1041338
protected function getParentsHierarchyField() {
		// see if we've got Parent values
        $parents = array();

        $parent = $this->owner;
        while ($parent && $parent->ParentID) {
            $parents[] = (int) $parent->ParentID;
            $parent = $parent->Parent();
            // fix for odd behaviour - in some instance a node is being assigned as its own parent. 
            if ($parent->ParentID == $parent->ID) {
                $parent = null;
            }
        }
        return $parents;
	}
115138
public function getParentAttribute()
    {
        $parentClass = $this->block->parent_type;
        return $parentClass::find($this->block->parent_id);
    }
1278638
final public function parent()
    {
        $parent = NULL;

        if(!!isset($this->dom_element->parentNode))
        {
            if($this->dom_element->parentNode->nodeType == 1)
            {
                $parent = new PHPHtmlDomElement($this->dom_element->parentNode);
            }
            else
            {
                $parent = $this->dom_element->parentNode;
            }
        }
        return $parent;
    }
993050
public function getCommandContext()
    {
        $context = parent::getCommandContext();
        $context->viewer = $this->_state->viewer;

        return $context;
    }
352127
public function getParent()
    {
        if ($this->parent === null) {
            $this->setParent($this->groupParameterRepository->getByChild($this));
        }
        return $this->parent;
    }
259694
public function getLocalOrParentInitMethod()
    {
        $method = $this->getInitMethod();
        if ($method) {
            $parentClassDefinition = $this->getExtendsClassDefinition();
            if ($parentClassDefinition instanceof self) {
                $method = $parentClassDefinition->getInitMethod();
                if ($method) {
                    $this->addInitMethod($method->getStatementsBlock());
                }
            }
        }

        return $method;
    }
322740
public function getParentRepository()
    {
        $parent = $this->getRepository()->getDescription()->getProperty('parent');
        $parent = $this->getIdentifier($parent->getParent());

        return AnDomain::getRepository($parent);
    }
958094
public function getParentClass()
    {
        return ($reflection = parent::getParentClass()) ? new self($reflection->getName(), $this->mapper, $this->entityReflectionProvider) : null;
    }
1259239
public function getParent()
    {
        if (\is_string($this->parent)) {
            $parent = TypeCollection::getInstance()->getTypeByName($this->parent);
            \assert($parent instanceof ObjectType);

            return $parent;
        }

        return $this->parent;
    }
537312
public function getContext()
    {
        if (!isset($this->context)) {
            $this->context = new RequestContext();
            $this->context->fromRequest($this->getRequest());
        }

        return $this->context;
    }
1278821
public function getContext()
    {
        $context = [
            'log_cmd_insert'    => [$this, 'onInsert'],
            'log_cmd_delete'    => [$this, 'onDelete'],
            'log_cmd_update'    => [$this, 'onUpdate'],
            'log_insert'        => [$this, 'onInsert'],
            'log_delete'        => [$this, 'onDelete'],
            'log_update'        => [$this, 'onUpdate'],
            'log_batchinsert'   => [$this, 'onBatchInsert'],
            'log_write_batch'   => [$this, 'onBatchInsert'],
            'log_query'         => [$this, 'onQuery']
        ];
        return $context;
    }
1109310
public function getParents()
    {
        $parents = [];
        if ($this->parent && !$this->parent instanceof Root) {
            $parents = $this->parent->getParents();
            $parents[] = $this->parent;
        }

        return $parents;
    }
885293
public function getParent()
    {
        if ($this->parent === null) {
            if (($parentId = $this->getParentPostId()) !== null) {
                $this->parent = $this->postFactory->create(get_post($parentId));
            } else {
                $this->parent = false;
            }
        }

        return $this->parent ?: null;
    }
1084688
public function getParentClass()
    {
        $parentClass  = parent::getParentClass();
        if (null === $parentClass || false === $parentClass) {
            return null;
        }
        
        $moufRefClass = new self($parentClass->getName());
        return $moufRefClass;
    }
360216
public function parentReflection()
    {
        $parentClass = $this->reflection->getParentClass();

        if (!empty($parentClass) && $parentClass->getName() != static::BASE_CLASS) {
            $parent = clone $this;
            $parent->reflection = $this->getParentClass();

            return $parent;
        }

        return null;
    }