public function storeNewParent() { if ($this->isDirty($this->getParentColumnName()) && ($this->exists || !$this->isRoot())) { static::$moveToNewParentId = $this->getParentId(); } else { static::$moveToNewParentId = false; } }