public function move($uid) { $old = clone $this; if (!$this->canChangeUrl()) { throw new Exception(l('pages.url.error.rights')); } $site = panel()->site(); $changes = $this->changes()->get(); $this->changes()->discard(); if ($site->multilang() and $site->language()->code() != $site->defaultLanguage()->code()) { parent::update(array('URL-Key' => $uid)); } else { parent::move($uid); } $this->changes()->update($changes); // hit the hook kirby()->trigger('panel.page.move', array($this, $old)); }