function SourcePluginBase::valid

Same name in other branches
  1. 8.9.x core/modules/migrate/src/Plugin/migrate/source/SourcePluginBase.php \Drupal\migrate\Plugin\migrate\source\SourcePluginBase::valid()
  2. 10 core/modules/migrate/src/Plugin/migrate/source/SourcePluginBase.php \Drupal\migrate\Plugin\migrate\source\SourcePluginBase::valid()
  3. 11.x core/modules/migrate/src/Plugin/migrate/source/SourcePluginBase.php \Drupal\migrate\Plugin\migrate\source\SourcePluginBase::valid()

Checks whether the iterator is currently valid.

Implementation of \Iterator::valid() - called at the top of the loop, returning TRUE to process the loop and FALSE to terminate it.

File

core/modules/migrate/src/Plugin/migrate/source/SourcePluginBase.php, line 370

Class

SourcePluginBase
The base class for source plugins.

Namespace

Drupal\migrate\Plugin\migrate\source

Code

public function valid() {
    return isset($this->currentRow);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.