-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BCIR-246 : Refactor islandora_entity_status - Events #7
base: main
Are you sure you want to change the base?
Conversation
Sync with main branch
Change Markup class
/** | ||
* Defines an event subscriber for Islandora Media. | ||
*/ | ||
class IslandoraNodeEntitySubscriber implements EventSubscriberInterface { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just for convention purposes, shouldn't this be named IslandoraNodeEventSubscriber
instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed to IslandoraNodeEventSubscriber
foreach ($results as $result) { | ||
$processed_nodes_message .= $result . '<br>'; | ||
} | ||
$messenger->addMessage(new Markup($processed_nodes_message, 'html')); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we be using Markup here? Would a render array be preferred?
We could instead add the node messages to a list:
$messages = [];
foreach ($results as $result) {
$messages[] = $result;
}
$message = [
'#theme' => 'item_list',
'#items' => $messages,
'#title' => $this->t('Processed Nodes'),
];
$this->messenger->addMessage(\Drupal::service('renderer')->renderRoot($message));
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree, changed to render array.
protected $messenger; | ||
|
||
/** | ||
* Constructs a new IslandoraMediaSubscriber object. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assuming this is just a copypasta error, should be IslandoraNodeEventSubscriber
/ IslandoraNodeEntitySubscriber
(depending on what the name ends up being)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed to IslandoraNodeEventSubscriber
/** | ||
* Defines an event subscriber for Islandora Media. | ||
*/ | ||
class IslandoraMediaEntitySubscriber implements EventSubscriberInterface { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be IslandoraMediaEventSubscriber
right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed to IslandoraMediaEventSubscriber
No description provided.