protected function setListParentDataInMemory($relation, $key, $subContext, $context = null)
    {
        $memory = $this->getListMemory();

        $oldContext    = $memory->getContext();
        $oldSubContext = $memory->getSubContext();

        if (null !== $context) {
            $memory->setContext($context);
        }

        $memory->setSubContext($subContext);

        $memory->setListParent($relation, $key);

        if (null !== $context) {
            $memory->setContext($oldContext);
        }

        $memory->setSubContext($oldSubContext);
    }
protected function setListParentDataInMemory($relation, $key, $subContext, $context = null)
    {
        $memory = $this->getListMemory();

        $oldContext    = $memory->getContext();
        $oldSubContext = $memory->getSubContext();

        if (null !== $context) {
            $memory->setContext($context);
        }

        $memory->setSubContext($subContext);

        $memory->setListParent($relation, $key);

        if (null !== $context) {
            $memory->setContext($oldContext);
        }

        $memory->setSubContext($oldSubContext);
    }
protected function setListParentDataInMemory ( $ relation , $ key , $ subContext , $ context = null ) { $ memory = $ this -> getListMemory ( ) ; $ oldContext = $ memory -> getContext ( ) ; $ oldSubContext = $ memory -> getSubContext ( ) ; if ( null !== $ context ) { $ memory -> setContext ( $ context ) ; } $ memory -> setSubContext ( $ subContext ) ; $ memory -> setListParent ( $ relation , $ key ) ; if ( null !== $ context ) { $ memory -> setContext ( $ oldContext ) ; } $ memory -> setSubContext ( $ oldSubContext ) ; }
Stores list parent data in memory and resets memory context.

@param string|null|false $relation
@param mixed|null        $key
@param string|null       $subContext
@param string|null       $context
Stores list parent data in memory and resets memory context .