You are here

ExpenseStorageInterface.php in Drupal PM (Project Management) 4.x

Namespace

Drupal\pm_expense

File

modules/pm_expense/src/ExpenseStorageInterface.php
View source
<?php

namespace Drupal\pm_expense;

use Drupal\Core\Entity\ContentEntityStorageInterface;
use Drupal\Core\Session\AccountInterface;
use Drupal\pm_expense\Entity\ExpenseInterface;

/**
 * Defines the storage handler class for Expense entities.
 *
 * This extends the base storage class, adding required special handling for
 * Expense entities.
 *
 * @ingroup pm_expense
 */
interface ExpenseStorageInterface extends ContentEntityStorageInterface {

  /**
   * Gets a list of Expense revision IDs for a specific Expense.
   *
   * @param \Drupal\pm_expense\Entity\ExpenseInterface $entity
   *   The Expense entity.
   *
   * @return int[]
   *   Expense revision IDs (in ascending order).
   */
  public function revisionIds(ExpenseInterface $entity);

  /**
   * Gets a list of revision IDs having a given user as Expense author.
   *
   * @param \Drupal\Core\Session\AccountInterface $account
   *   The user entity.
   *
   * @return int[]
   *   Expense revision IDs (in ascending order).
   */
  public function userRevisionIds(AccountInterface $account);

}

Interfaces

Namesort descending Description
ExpenseStorageInterface Defines the storage handler class for Expense entities.