interface ImportProcessorInterface in Entity Share 8.3
An interface for Import processor plugins.
Hierarchy
- interface \Drupal\Component\Plugin\ConfigurableInterface
- interface \Drupal\entity_share_client\ImportProcessor\ImportProcessorInterface
Expanded class hierarchy of ImportProcessorInterface
All classes that implement ImportProcessorInterface
2 files declare their use of ImportProcessorInterface
- ImportConfigForm.php in modules/
entity_share_client/ src/ Form/ ImportConfigForm.php - ImportService.php in modules/
entity_share_client/ src/ Service/ ImportService.php
File
- modules/
entity_share_client/ src/ ImportProcessor/ ImportProcessorInterface.php, line 14
Namespace
Drupal\entity_share_client\ImportProcessorView source
interface ImportProcessorInterface extends ConfigurableInterface {
/**
* Processing stage: prepare entity data.
*
* @see \Drupal\entity_share_client\ImportProcessor\ImportProcessorInterface::prepareEntityData()
*/
const STAGE_PREPARE_ENTITY_DATA = 'prepare_entity_data';
/**
* Processing stage: is entity importable.
*
* @see \Drupal\entity_share_client\ImportProcessor\ImportProcessorInterface::isEntityImportable()
*/
const STAGE_IS_ENTITY_IMPORTABLE = 'is_entity_importable';
/**
* Processing stage: prepare importable entity data.
*
* @see \Drupal\entity_share_client\ImportProcessor\ImportProcessorInterface::prepareImportableEntityData()
*/
const STAGE_PREPARE_IMPORTABLE_ENTITY_DATA = 'prepare_importable_entity_data';
/**
* Processing stage: process entity.
*
* @see \Drupal\entity_share_client\ImportProcessor\ImportProcessorInterface::processEntity()
*/
const STAGE_PROCESS_ENTITY = 'process_entity';
/**
* Processing stage: post entity save.
*
* @see \Drupal\entity_share_client\ImportProcessor\ImportProcessorInterface::postEntitySave()
*/
const STAGE_POST_ENTITY_SAVE = 'post_entity_save';
/**
* Returns the label for use on the administration pages.
*
* @return string
* The administration label.
*/
public function label();
/**
* Returns the plugin's description.
*
* @return string
* A string describing the plugin. Might contain HTML and should be already
* sanitized for output.
*/
public function getDescription();
/**
* Checks whether this processor implements a particular stage.
*
* @param string $stage
* The stage to check: one of the self::STAGE_* constants.
*
* @return bool
* TRUE if the processor runs on this particular stage; FALSE otherwise.
*/
public function supportsStage($stage);
/**
* Returns the weight for a specific processing stage.
*
* @param string $stage
* The stage whose weight should be returned.
*
* @return int
* The default weight for the given stage.
*
* @see \Drupal\entity_share_client\ImportProcessor\ImportProcessorPluginManager::getProcessingStages()
*/
public function getWeight($stage);
/**
* Sets the weight for a specific processing stage.
*
* @param string $stage
* The stage whose weight should be set.
* @param int $weight
* The weight for the given stage.
*
* @return $this
*
* @see \Drupal\entity_share_client\ImportProcessor\ImportProcessorPluginManager::getProcessingStages()
*/
public function setWeight($stage, $weight);
/**
* Determines whether this processor should always be enabled.
*
* @return bool
* TRUE if this processor should be forced enabled; FALSE otherwise.
*/
public function isLocked();
/**
* Method called on STAGE_PREPARE_ENTITY_DATA.
*
* If the plugin reacts to this stage.
*
* @param \Drupal\entity_share_client\RuntimeImportContext $runtime_import_context
* The import context.
* @param array $entity_json_data
* The entity JSON data.
*/
public function prepareEntityData(RuntimeImportContext $runtime_import_context, array &$entity_json_data);
/**
* Method called on STAGE_IS_ENTITY_IMPORTABLE.
*
* If the plugin reacts to this stage.
*
* @param \Drupal\entity_share_client\RuntimeImportContext $runtime_import_context
* The import context.
* @param array $entity_json_data
* The entity JSON data.
*
* @return bool
* TRUE if the entity is importable. FALSE otherwise.
*/
public function isEntityImportable(RuntimeImportContext $runtime_import_context, array $entity_json_data);
/**
* Method called on STAGE_PREPARE_IMPORTABLE_ENTITY_DATA.
*
* If the plugin reacts to this stage.
*
* @param \Drupal\entity_share_client\RuntimeImportContext $runtime_import_context
* The import context.
* @param array $entity_json_data
* The entity JSON data.
*/
public function prepareImportableEntityData(RuntimeImportContext $runtime_import_context, array &$entity_json_data);
/**
* Method called on STAGE_PROCESS_ENTITY.
*
* If the plugin reacts to this stage.
*
* @param \Drupal\entity_share_client\RuntimeImportContext $runtime_import_context
* The import context.
* @param \Drupal\Core\Entity\ContentEntityInterface $processed_entity
* The entity being processed.
* @param array $entity_json_data
* The entity JSON data.
*/
public function processEntity(RuntimeImportContext $runtime_import_context, ContentEntityInterface $processed_entity, array $entity_json_data);
/**
* Method called on STAGE_POST_ENTITY_SAVE.
*
* If the plugin reacts to this stage.
*
* @param \Drupal\entity_share_client\RuntimeImportContext $runtime_import_context
* The import context.
* @param \Drupal\Core\Entity\ContentEntityInterface $processed_entity
* The entity being processed.
*/
public function postEntitySave(RuntimeImportContext $runtime_import_context, ContentEntityInterface $processed_entity);
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ConfigurableInterface:: |
public | function | Gets default configuration for this plugin. | 11 |
ConfigurableInterface:: |
public | function | Gets this plugin's configuration. | 12 |
ConfigurableInterface:: |
public | function | Sets the configuration for this plugin instance. | 12 |
ImportProcessorInterface:: |
public | function | Returns the plugin's description. | 1 |
ImportProcessorInterface:: |
public | function | Returns the weight for a specific processing stage. | 1 |
ImportProcessorInterface:: |
public | function | Method called on STAGE_IS_ENTITY_IMPORTABLE. | 1 |
ImportProcessorInterface:: |
public | function | Determines whether this processor should always be enabled. | 1 |
ImportProcessorInterface:: |
public | function | Returns the label for use on the administration pages. | 1 |
ImportProcessorInterface:: |
public | function | Method called on STAGE_POST_ENTITY_SAVE. | 1 |
ImportProcessorInterface:: |
public | function | Method called on STAGE_PREPARE_ENTITY_DATA. | 1 |
ImportProcessorInterface:: |
public | function | Method called on STAGE_PREPARE_IMPORTABLE_ENTITY_DATA. | 1 |
ImportProcessorInterface:: |
public | function | Method called on STAGE_PROCESS_ENTITY. | 1 |
ImportProcessorInterface:: |
public | function | Sets the weight for a specific processing stage. | 1 |
ImportProcessorInterface:: |
constant | Processing stage: is entity importable. | ||
ImportProcessorInterface:: |
constant | Processing stage: post entity save. | ||
ImportProcessorInterface:: |
constant | Processing stage: prepare entity data. | ||
ImportProcessorInterface:: |
constant | Processing stage: prepare importable entity data. | ||
ImportProcessorInterface:: |
constant | Processing stage: process entity. | ||
ImportProcessorInterface:: |
public | function | Checks whether this processor implements a particular stage. | 1 |