You are here

public function ReplicationTask::setDocIds in Replication 8.2

Same name and namespace in other branches
  1. 8 src/ReplicationTask/ReplicationTask.php \Drupal\replication\ReplicationTask\ReplicationTask::setDocIds()

Parameters

array $docIds:

Overrides ReplicationTaskInterface::setDocIds

File

src/ReplicationTask/ReplicationTask.php, line 202

Class

ReplicationTask

Namespace

Drupal\replication\ReplicationTask

Code

public function setDocIds($docIds) {
  if ($docIds != NULL) {
    sort($docIds);
    if ($this->filter === NULL) {
      $this->filter = '_doc_ids';
    }
    elseif ($this->filter !== '_doc_ids') {
      throw new InvalidArgumentException('If docIds is specified, the filter should be set as _doc_ids');
    }
  }
  $this->docIds = $docIds;
  return $this;
}