-
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
Some extra changes for D9. #3
base: d9
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
namespace Drupal\rng\EventSubscriber; | ||
|
||
use Symfony\Component\EventDispatcher\EventSubscriberInterface; | ||
use Symfony\Component\HttpKernel\Event\PostResponseEvent; | ||
use Symfony\Component\HttpKernel\Event\TerminateEvent; | ||
use Symfony\Component\HttpKernel\KernelEvents; | ||
use Drupal\Core\Entity\EntityTypeManagerInterface; | ||
use Drupal\rng\RngEntityModelInterface; | ||
|
@@ -54,10 +54,10 @@ public function __construct(EntityTypeManagerInterface $entity_type_manager, Rng | |
/** | ||
* Run RNG rules for entity operations which occurred during this request. | ||
* | ||
* @param \Symfony\Component\HttpKernel\Event\PostResponseEvent $event | ||
* @param \Symfony\Component\HttpKernel\Event\TerminateEvent $event | ||
* The event to process. | ||
*/ | ||
public function onKernelTerminate(PostResponseEvent $event) { | ||
public function onKernelTerminate(TerminateEvent $event) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please file separate issue for that, also it needs link to change record where the event was renamed |
||
$operation_records = $this->rngEntityModel->getOperationRecords(); | ||
foreach ($operation_records as $operation_record) { | ||
if ($operation_record->getEntityTypeId() == 'registration') { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -413,7 +413,7 @@ public function save(array $form, FormStateInterface $form_state) { | |
|
||
$message = ($status == SAVED_UPDATED) ? '%label event type updated.' : '%label event type added.'; | ||
$url = $event_type->toUrl(); | ||
$t_args = ['%label' => $event_type->id(), 'link' => Link::fromTextAndUrl(t('Edit'), $url)]; | ||
$t_args = ['%label' => $event_type->id(), 'link' => (Link::fromTextAndUrl($this->t('Edit'), $url))->toString()]; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good catch, also it needs separate issue (probably it exists) Moreover it needs to rework messages as they are not translatable yet There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
||
$this->messenger()->addMessage($this->t($message, $t_args)); | ||
$this->logger('rng')->notice($message, $t_args); | ||
|
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.
Entity manager addressed in
d9-fixes
branch where I did split commits on per d-org issueThere 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.
Basically rename of the variable is useless at the moment