Пример #1
0
 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();
 }
Пример #2
0
 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);
 }
Пример #3
0
 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();
 }