mutual_credit-5.0.x-dev/modules/limits/src/Plugin/McapiLimitsInterface.php

modules/limits/src/Plugin/McapiLimitsInterface.php
<?php

namespace Drupal\mcapi_limits\Plugin;

use Drupal\mcapi\Entity\WalletInterface;
use Drupal\mcapi\Entity\TransactionInterface;
use Drupal\Core\Plugin\PluginFormInterface;
use Drupal\Component\Plugin\ConfigurableInterface;
use Drupal\Core\Session\AccountInterface;

/**
 * Interface for Limits object.
 */
interface McapiLimitsInterface extends ConfigurableInterface, PluginFormInterface {

  /**
   * Get the limits according to the plugin settings.
   *
   * @param WalletInterface $wallet
   *   The wallet.
   *
   * @return array
   *   Native currency amounts keyed with 'min' and 'max'.
   */
  public function currencyLimits(WalletInterface $wallet);

  /**
   *
   * @param TransactionInterface $transaction
   * @param AccountInterface $account
   *
   * @return bool
   *   TRUE if the balance limit need not be checked
   */
  public function skipChecks(TransactionInterface $transaction) : bool;
}

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc