pdf_to_imagefield-1.0.x-dev/src/PDFToImageManagerInterface.php
src/PDFToImageManagerInterface.php
<?php
namespace Drupal\pdf_to_imagefield;
use Drupal\Core\Entity\ContentEntityInterface;
use Drupal\pdf_to_imagefield\PDFToImageBatchHelper as BatchHelper;
/**
* Provides helper interface of PDFToImageManager.
*/
interface PDFToImageManagerInterface {
/**
* Helper class needed for drush commands.
*/
const HELPER_CLASS = BatchHelper::class;
/**
* Helper function to get a list of available image fields.
*
* @param string $entity_type_id
* The entity type ID.
* @param string $bundle
* The bundle name.
*
* @return array
* The list of target image fields.
*/
public function getImageTargetFields(string $entity_type_id, string $bundle): array;
/**
* Helper function to get a list of source pdf_to_imagefield fields.
*
* @param string $entity_type_id
* The entity type ID.
* @param string $bundle
* The bundle name.
*
* @return array
* The list of source fields.
*/
public function getPdfToImageSourceFields(string $entity_type_id, string $bundle): array;
/**
* Inits PDFtoImage conversion process.
*
* @param \Drupal\Core\Entity\ContentEntityInterface $entity
* The fieldable content entity.
* @param string $field_id
* The field machine name.
* @param array $field
* The field definition.
*/
public function initConversion(ContentEntityInterface $entity, string $field_id, array $field): void;
}
