Browse Source

pass the event type through to alpaca, rename action, remove reaction since it can be fired with the IndexReaction

pull/733/head
Eli Zoller 6 years ago
parent
commit
98ec09f2c7
  1. 4
      modules/islandora_core_feature/config/install/system.action.create_node_version_in_fedora.yml
  2. 7
      src/EventGenerator/EventGenerator.php
  3. 15
      src/Plugin/ContextReaction/VersionReaction.php

4
modules/islandora_core_feature/config/install/system.action.version_node_in_fedora.yml → modules/islandora_core_feature/config/install/system.action.create_node_version_in_fedora.yml

@ -6,8 +6,8 @@ dependencies:
- islandora_core_feature
module:
- islandora
id: version_node_in_fedora
label: 'Version Node in Fedora'
id: create_node_version_in_fedora
label: 'Create Node Version in Fedora'
type: node
plugin: emit_node_event
configuration:

7
src/EventGenerator/EventGenerator.php

@ -104,11 +104,8 @@ class EventGenerator implements EventGeneratorInterface {
$event["type"] = ucfirst($data["event"]);
$event["summary"] = ucfirst($data["event"]) . " a " . ucfirst($entity_type);
}
if ($data["event"] == "Update"){
$event["object"]["createVersion"] = TRUE;
} else {
$event["object"]["createVersion"] = FALSE;
}
$event["object"]["type"] = $event["type"];
// Add REST links for non-file entities.
if ($entity_type != 'file') {

15
src/Plugin/ContextReaction/VersionReaction.php

@ -1,15 +0,0 @@
<?php
namespace Drupal\islandora\Plugin\ContextReaction;
use Drupal\islandora\PresetReaction\PresetReaction;
/**
* Versioning context reaction.
*
* @ContextReaction(
* id = "version",
* label = @Translation("Version")
* )
*/
class VersionReaction extends PresetReaction {}
Loading…
Cancel
Save