You are here

class ContactStorageExport in Contact Storage Export 8

Class ContactStorageExport.

@package Drupal\contact_storage_export

Hierarchy

Expanded class hierarchy of ContactStorageExport

1 file declares its use of ContactStorageExport
ContactStorageExportForm.php in src/Form/ContactStorageExportForm.php

File

src/ContactStorageExport.php, line 10

Namespace

Drupal\contact_storage_export
View source
class ContactStorageExport {

  /**
   * Get the last id that was exported.
   *
   * @param string $contact_form
   *   The contact form machine name.
   *
   * @return int
   *   The last id exported (or zero if none yet).
   */
  public static function getLastExportId($contact_form) {
    $key = 'contact_storage_export.' . $contact_form;
    return \Drupal::keyValue($key)
      ->get('last_id', 0);
  }

  /**
   * Set the last id that was exported.
   *
   * @param string $contact_form
   *   The contact form machine name.
   * @param int $last_id
   *   The last id exported.
   */
  public static function setLastExportId($contact_form, $last_id) {
    $key = 'contact_storage_export.' . $contact_form;
    \Drupal::keyValue($key)
      ->set('last_id', $last_id);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
ContactStorageExport::getLastExportId public static function Get the last id that was exported.
ContactStorageExport::setLastExportId public static function Set the last id that was exported.