You are here

interface PrevNextHelperInterface in Previous/Next API 8.2

Interface for PrevNextHelper.

Hierarchy

Expanded class hierarchy of PrevNextHelperInterface

All classes that implement PrevNextHelperInterface

1 file declares its use of PrevNextHelperInterface
PrevNextBlock.php in src/Plugin/Block/PrevNextBlock.php

File

src/PrevNextHelperInterface.php, line 8

Namespace

Drupal\prev_next
View source
interface PrevNextHelperInterface {

  /**
   * Determine if connection should be refreshed.
   *
   * @return array
   *   Returns the list of Node types.
   */
  public function getBundleNames();

  /**
   * Loads the Prev/next bundle configuration.
   *
   * @param string $bundle_name
   *   Entity Type name.
   *
   * @return \Drupal\Core\Config\ImmutableConfig
   *   A configuration object.
   */
  public function loadBundle($bundle_name);

  /**
   * Callable API function to get the next/prev id of a given entity id.
   *
   * @param int $entity_id
   *   Entity id.
   * @param string $op
   *   The type of operation.
   */
  public function getPrevnextId($entity_id, $op = 'next');

  /**
   * Callable API function to retun the prev id of a given entity id.
   *
   * @param int $entity_id
   *   Entity id.
   *
   * @return int|null
   *   Entity id if found.
   */
  public function getPrevId($entity_id);

  /**
   * Callable API function to retun the next id of a given entity id.
   *
   * @param int $entity_id
   *   Entity id.
   *
   * @return int|null
   *   Entity id if found.
   */
  public function getNextId($entity_id);

}

Members

Namesort descending Modifiers Type Description Overrides
PrevNextHelperInterface::getBundleNames public function Determine if connection should be refreshed. 1
PrevNextHelperInterface::getNextId public function Callable API function to retun the next id of a given entity id. 1
PrevNextHelperInterface::getPrevId public function Callable API function to retun the prev id of a given entity id. 1
PrevNextHelperInterface::getPrevnextId public function Callable API function to get the next/prev id of a given entity id. 1
PrevNextHelperInterface::loadBundle public function Loads the Prev/next bundle configuration. 1