You are here

public function PrevNextApi::update in Previous/Next API 8.2

Update the prev_next records.

Parameters

int $entity_id: Entity id.

string $bundle_name: Entity type.

Overrides PrevNextApiInterface::update

File

src/PrevNextApi.php, line 151

Class

PrevNextApi
Defines an PrevNextApi service.

Namespace

Drupal\prev_next

Code

public function update($entity_id, $bundle_name) {

  // Find out if any other entities point to this node and update them.
  $this
    ->modifyPointingEntities($entity_id, $bundle_name);

  // Then update this one.
  $this
    ->add($entity_id, $bundle_name);
}