You are here

public function IndexerBase::add in Drupal 7 to 8/9 Module Upgrader 8

Overrides IndexerInterface::add

3 methods override IndexerBase::add()
Classes::add in src/Plugin/DMU/Indexer/Classes.php
Constants::add in src/Plugin/DMU/Indexer/Constants.php
Functions::add in src/Plugin/DMU/Indexer/Functions.php

File

src/IndexerBase.php, line 128

Class

IndexerBase
Base class for indexers.

Namespace

Drupal\drupalmoduleupgrader

Code

public function add(NodeInterface $node) {
  $this->db
    ->insert($this->table)
    ->fields([
    'id' => (string) $node
      ->getName(),
    'file' => $node
      ->getFilename(),
  ])
    ->execute();
}