public function update($data = array(), $lang = null) { // keep the old state of the page object $old = clone $this; $this->changes()->discard(); parent::update($data, $lang); // update the number if the date field // changed for example $this->updateNum(); kirby()->trigger('panel.page.update', array($this, $old)); // add the page to the history $this->addToHistory(); }
public function update($input = array(), $lang = null) { $data = $this->filterInput($input); $this->changes()->discard(); parent::update($data, $lang); $this->updateNum(); $this->updateUid(); $this->addToHistory(); kirby()->trigger('panel.page.update', $this); }
public function update($data = array(), $lang = null) { $this->changes()->discard(); parent::update($data, $lang); // update the number if the date field // changed for example $this->updateNum(); kirby()->trigger('panel.page.update', $this); // add the page to the history $this->addToHistory(); }