You are here

public function Model::save in Little helpers 7.2

Same name and namespace in other branches
  1. 7 src/DB/Model.php \Drupal\little_helpers\DB\Model::save()

File

src/DB/Model.php, line 35

Class

Model

Namespace

Drupal\little_helpers\DB

Code

public function save() {
  if ($this
    ->isNew()) {
    $this
      ->insert();
  }
  else {
    $this
      ->update();
  }
  $this->new = FALSE;
}