You are here

public function view::_save_rows in Views (for Drupal 7) 7.3

Same name and namespace in other branches
  1. 6.3 includes/view.inc \view::_save_rows()
  2. 6.2 includes/view.inc \view::_save_rows()

Save a row to the database for the given key.

i.e. one of the keys from view::db_objects().

1 call to view::_save_rows()
view::save in includes/view.inc
Save the view to the database.

File

includes/view.inc, line 1917
views_objects Objects that represent a View or part of a view

Class

view
An object to contain all of the data to generate a view.

Code

public function _save_rows($key) {
  $count = 0;
  foreach ($this->{$key} as $position => $object) {
    $object->position = ++$count;
    $object->vid = $this->vid;
    $object
      ->save_row();
  }
}