public function setListParent($relation, $recordKey = null)
    {
        if (false !== $relation && empty($relation)) {
            return $this->clearListParent();
        }

        if (false === $relation) {
            session()->put($this->getSessionKey(static::TYPE_PARENT), static::PARENT_DISABLE);
        } else {
            session()->put($this->getSessionKey(static::TYPE_PARENT), $relation . ':' . $recordKey);
        }

        return $this;
    }
public function setListParent($relation, $recordKey = null)
    {
        if (false !== $relation && empty($relation)) {
            return $this->clearListParent();
        }

        if (false === $relation) {
            session()->put($this->getSessionKey(static::TYPE_PARENT), static::PARENT_DISABLE);
        } else {
            session()->put($this->getSessionKey(static::TYPE_PARENT), $relation . ':' . $recordKey);
        }

        return $this;
    }
public function setListParent ( $ relation , $ recordKey = null ) { if ( false !== $ relation && empty ( $ relation ) ) { return $ this -> clearListParent ( ) ; } if ( false === $ relation ) { session ( ) -> put ( $ this -> getSessionKey ( static :: TYPE_PARENT ) , static :: PARENT_DISABLE ) ; } else { session ( ) -> put ( $ this -> getSessionKey ( static :: TYPE_PARENT ) , $ relation . ':' . $ recordKey ) ; } return $ this ; }
Sets active parent for the current context.

@param string|false $relation    false to disable default top-level only filter, otherwise model key string
@param mixed        $recordKey
@return $this
Sets active parent for the current context .