interface EntityHandlerInterface in CMS Content Sync 8
Same name and namespace in other branches
- 2.1.x src/Plugin/EntityHandlerInterface.php \Drupal\cms_content_sync\Plugin\EntityHandlerInterface
- 2.0.x src/Plugin/EntityHandlerInterface.php \Drupal\cms_content_sync\Plugin\EntityHandlerInterface
Specifies the publicly available methods of an entity handler plugin that can be used to push and pull entities with Sync Core.
Hierarchy
- interface \Drupal\Component\Plugin\PluginInspectionInterface
- interface \Drupal\cms_content_sync\Plugin\EntityHandlerInterface
Expanded class hierarchy of EntityHandlerInterface
All classes that implement EntityHandlerInterface
See also
\Drupal\cms_content_sync\Annotation\EntityHandler
\Drupal\cms_content_sync\Plugin\EntityHandlerBase
\Drupal\cms_content_sync\Plugin\Type\EntityHandlerPluginManager
\Drupal\cms_content_sync\Entity\Flow
File
- src/
Plugin/ EntityHandlerInterface.php, line 22
Namespace
Drupal\cms_content_sync\PluginView source
interface EntityHandlerInterface extends PluginInspectionInterface {
/**
* Check if this handler supports the given entity type.
*
* @param string $entity_type
* @param string $bundle
*
* @return bool
*/
public static function supports($entity_type, $bundle);
/**
* Get the allowed push options.
*
* Get a list of all allowed push options for this entity.
*
* @see Flow::PUSH_*
*
* @return string[]
*/
public function getAllowedPushOptions();
/**
* Get the allowed pull options.
*
* Get a list of all allowed pull options for this field.
*
* @see Flow::PULL_*
*
* @return string[]
*/
public function getAllowedPullOptions();
/**
* @return string[]
* Provide the allowed preview options used for display when manually
* pulling entities
*/
public function getAllowedPreviewOptions();
/**
* Get the handler settings.
*
* Return the actual form elements for any additional settings for this
* handler.
*
* @param array $current_values
* The current values that the user set, if any
* @param string $type:
* One of 'pull', 'push', 'both'
*
* @return array
*/
public function getHandlerSettings($current_values, $type = 'both');
/**
* Validate the settings defined above. $form and $form_state are the same as
* in the Form API. $settings_key is the index at $form['sync_entities'] for
* this handler instance.
*
* @param $settings_key
* @param $current_values
*
* @return mixed
*/
public function validateHandlerSettings(array &$form, FormStateInterface $form_state, $settings_key, $current_values);
/**
* Update the entity type definition.
*
* Advanced entity type definition settings for the Sync Core. You
* can usually ignore these.
*
* @param \EdgeBox\SyncCore\Interfaces\Configuration\IDefineEntityType $definition
* The definition to be sent to Sync Core.
* {@see SyncCoreExport}.
*/
public function updateEntityTypeDefinition(&$definition);
/**
* Provide a list of fields that are not allowed to be pushed or pulled.
* These fields typically contain all label fields that are pushed
* separately anyway (we don't want to set IDs and revision IDs of entities
* for example, but only use the UUID for references).
*
* @return string[]
*/
public function getForbiddenFields();
/**
* @throws \Drupal\cms_content_sync\Exception\SyncException
*
* @return bool
* Whether or not the content has been pulled. FALSE is a desired state,
* meaning nothing should be pulled according to config.
*/
public function pull(PullIntent $intent);
/**
* @param \Drupal\cms_content_sync\PushIntent $intent
* The request to store all relevant info at
*
* @throws \Drupal\cms_content_sync\Exception\SyncException
*
* @return bool
* Whether or not the content has been pushed. FALSE is a desired state,
* meaning nothing should be pushed according to config.
*/
public function push(PushIntent $intent);
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
EntityHandlerInterface:: |
public | function | 8 | |
EntityHandlerInterface:: |
public | function | Get the allowed pull options. | 1 |
EntityHandlerInterface:: |
public | function | Get the allowed push options. | 1 |
EntityHandlerInterface:: |
public | function | Provide a list of fields that are not allowed to be pushed or pulled. These fields typically contain all label fields that are pushed separately anyway (we don't want to set IDs and revision IDs of entities for example, but only use the UUID for… | 1 |
EntityHandlerInterface:: |
public | function | Get the handler settings. | 1 |
EntityHandlerInterface:: |
public | function | 1 | |
EntityHandlerInterface:: |
public | function | 1 | |
EntityHandlerInterface:: |
public static | function | Check if this handler supports the given entity type. | 8 |
EntityHandlerInterface:: |
public | function | Update the entity type definition. | 1 |
EntityHandlerInterface:: |
public | function | Validate the settings defined above. $form and $form_state are the same as in the Form API. $settings_key is the index at $form['sync_entities'] for this handler instance. | 1 |
PluginInspectionInterface:: |
public | function | Gets the definition of the plugin implementation. | 4 |
PluginInspectionInterface:: |
public | function | Gets the plugin_id of the plugin instance. | 2 |