From df29e6b06b99ec3327cdeb39a6929969cee28850 Mon Sep 17 00:00:00 2001 From: Danny Lamb Date: Mon, 5 Dec 2016 14:58:21 +0000 Subject: [PATCH] Playing with rules --- .../src/Plugin/RulesAction/FedoraIndexer.php | 80 +++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 islandora/src/Plugin/RulesAction/FedoraIndexer.php diff --git a/islandora/src/Plugin/RulesAction/FedoraIndexer.php b/islandora/src/Plugin/RulesAction/FedoraIndexer.php new file mode 100644 index 00000000..b06bdada --- /dev/null +++ b/islandora/src/Plugin/RulesAction/FedoraIndexer.php @@ -0,0 +1,80 @@ +serializer = $serializer; + } + + /** + * {@inheritdoc} + */ + public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) { + return new static( + $configuration, + $plugin_id, + $plugin_definition, + $container->get('serializer') + ); + } + + /** + * Set a system message. + * + */ + protected function doExecute(EntityInterface $entity, $broker_url, $queue) { + $message = new array( + + ); + $serialized = $this->serializer->serialize($entity, 'jsonld'); + drupal_set_message($serialized, "info", FALSE); + } +}