marketo_suite-1.0.x-dev/src/MarketoFormEntityStorageInterface.php

src/MarketoFormEntityStorageInterface.php
<?php

namespace Drupal\e3_marketo;

use Drupal\Core\Entity\ContentEntityStorageInterface;
use Drupal\Core\Language\LanguageInterface;
use Drupal\Core\Session\AccountInterface;
use Drupal\e3_marketo\Entity\MarketoFormEntityInterface;

/**
 * Defines the storage handler class for Marketo form entity entities.
 *
 * This extends the base storage class, adding required special handling for
 * Marketo form entity entities.
 *
 * @ingroup e3_marketo
 */
interface MarketoFormEntityStorageInterface extends ContentEntityStorageInterface {

  /**
   * Gets a list of Marketo form entity revision IDs for a Marketo form entity.
   *
   * @param \Drupal\e3_marketo\Entity\MarketoFormEntityInterface $entity
   *   The Marketo form entity.
   *
   * @return int[]
   *   Marketo form entity revision IDs (in ascending order).
   */
  public function revisionIds(MarketoFormEntityInterface $entity) : array;

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

  /**
   * Counts the number of revisions in the default language.
   *
   * @param \Drupal\e3_marketo\Entity\MarketoFormEntityInterface $entity
   *   The Marketo form entity.
   *
   * @return int
   *   The number of revisions in the default language.
   */
  public function countDefaultLanguageRevisions(MarketoFormEntityInterface $entity) : int;

  /**
   * Unsets the language for all Marketo form entity with the given language.
   *
   * @param \Drupal\Core\Language\LanguageInterface $language
   *   The language.
   *
   * @return int|null
   *   Query result.
   */
  public function clearRevisionsLanguage(LanguageInterface $language) : ?int;

  /**
   * Load the Marketo Form entity by Marketo ID.
   *
   * @param string $marketo_id
   *   Marketo ID to use.
   *
   * @return array
   *   An array of matching forms.
   */
  public function loadByMarketoId(string $marketo_id) : array;

}

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

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