kirby/branches/multilang/page.php
/**
   * Update the page with a new set of data
   *
   * @param array $data
   */
Update the page with a new set of data
@param array $data
Update the page with a new set of data @param array $data
public function update($input = array(), $lang = null) {
    $data = a::update($this->content($lang)->toArray(), $input);
    if(!data::write($this->textfile(null, $lang), $data, 'kd')) {
      throw new Exception('The page could not be updated');
    }
    $this->kirby->cache()->flush();
    $this->reset();
    $this->touch();
    return true;
  }
public function update ( $ input = array ( ) , $ lang = null ) { $ data = a :: update ( $ this -> content ( $ lang ) -> toArray ( ) , $ input ) ; if ( ! data :: write ( $ this -> textfile ( null , $ lang ) , $ data , 'kd' ) ) { throw new Exception ( 'The page could not be updated' ) ; } $ this -> kirby -> cache ( ) -> flush ( ) ; $ this -> reset ( ) ; $ this -> touch ( ) ; return true ; }
Update the page with a new set of data
 @param array $data
Update the page with a new set of data @param array $data