]> Raphaël G. Git Repositories - airbundle/commitdiff
Use getObject event args member function instead of deprecated getEntity
authorRaphaël Gertz <git@rapsys.eu>
Thu, 7 Mar 2024 20:54:32 +0000 (21:54 +0100)
committerRaphaël Gertz <git@rapsys.eu>
Thu, 7 Mar 2024 20:54:32 +0000 (21:54 +0100)
Entity/Application.php
Entity/Country.php
Entity/Dance.php
Entity/GoogleCalendar.php
Entity/GoogleToken.php
Entity/Location.php
Entity/Slot.php
Entity/Snippet.php

index 5d3120360342c6761cf51c76bca43fe7e2df1a60..4e94f204fe63f289d359f26d84187b9d033a1067 100644 (file)
@@ -238,7 +238,7 @@ class Application {
         */
        public function preUpdate(PreUpdateEventArgs $eventArgs) {
                //Check that we have an application instance
-               if (($application = $eventArgs->getEntity()) instanceof Application) {
+               if (($application = $eventArgs->getObject()) instanceof Application) {
                        //Set updated value
                        $application->setUpdated(new \DateTime('now'));
                }
index 07124c598b3d0d9c8d0f752520887cfd97b27719..5674007e439c8c008037cf57491f54c3ef7120d6 100644 (file)
@@ -227,7 +227,7 @@ class Country {
         */
        public function preUpdate(PreUpdateEventArgs $eventArgs) {
                //Check that we have an country instance
-               if (($country = $eventArgs->getEntity()) instanceof Country) {
+               if (($country = $eventArgs->getObject()) instanceof Country) {
                        //Set updated value
                        $country->setUpdated(new \DateTime('now'));
                }
index 796b81f20798f80239fca9dee7fee51ced9ce337..0b132c8418cd76f59846514ffb62784aaa222743 100644 (file)
@@ -249,7 +249,7 @@ class Dance {
         */
        public function preUpdate(PreUpdateEventArgs $eventArgs) {
                //Check that we have a dance instance
-               if (($dance = $eventArgs->getEntity()) instanceof Dance) {
+               if (($dance = $eventArgs->getObject()) instanceof Dance) {
                        //Set updated value
                        $dance->setUpdated(new \DateTime('now'));
                }
index 940a678b01fa8e3a45a11948853863c8d3adeb56..ff4f455367e58698b18daac6f09f3c484f686b2d 100644 (file)
@@ -216,7 +216,7 @@ class GoogleCalendar {
         */
        public function preUpdate(PreUpdateEventArgs $eventArgs): ?GoogleCalendar {
                //Check that we have an snippet instance
-               if (($entity = $eventArgs->getEntity()) instanceof GoogleCalendar) {
+               if (($entity = $eventArgs->getObject()) instanceof GoogleCalendar) {
                        //Set updated value
                        return $entity->setUpdated(new \DateTime('now'));
                }
index 68a1d384338733cefbda155f048fbf123f63889c..3da7279ed8d66afdff49aa1fadc17449eb18918b 100644 (file)
@@ -283,7 +283,7 @@ class GoogleToken {
         */
        public function preUpdate(PreUpdateEventArgs $eventArgs): ?GoogleToken {
                //Check that we have an snippet instance
-               if (($entity = $eventArgs->getEntity()) instanceof GoogleToken) {
+               if (($entity = $eventArgs->getObject()) instanceof GoogleToken) {
                        //Set updated value
                        return $entity->setUpdated(new \DateTime('now'));
                }
index 73b07f7c93d02183f9b6db768cab05c48ffea2b5..85283df046b4db3323b5396b9d86d07c4eafa922 100644 (file)
@@ -468,7 +468,7 @@ class Location {
         */
        public function preUpdate(PreUpdateEventArgs $eventArgs) {
                //Check that we have a location instance
-               if (($location = $eventArgs->getEntity()) instanceof Location) {
+               if (($location = $eventArgs->getObject()) instanceof Location) {
                        //Set updated value
                        $location->setUpdated(new \DateTime('now'));
                }
index 116c29fcd6576e081fb21d377a8e9d7c808aa783..445f053da023dd3f7d4e0bf9cec050a2ebc0c6a4 100644 (file)
@@ -164,7 +164,7 @@ class Slot {
         */
        public function preUpdate(PreUpdateEventArgs $eventArgs) {
                //Check that we have a slot instance
-               if (($slot = $eventArgs->getEntity()) instanceof Slot) {
+               if (($slot = $eventArgs->getObject()) instanceof Slot) {
                        //Set updated value
                        $slot->setUpdated(new \DateTime('now'));
                }
index a764a6602586c3c121476d77a266f7d41bbc3f8a..fa5fe996fbcc68d74fc4ccf6d7dec693aaeef29a 100644 (file)
@@ -432,7 +432,7 @@ class Snippet {
         */
        public function preUpdate(PreUpdateEventArgs $eventArgs) {
                //Check that we have an snippet instance
-               if (($snippet = $eventArgs->getEntity()) instanceof Snippet) {
+               if (($snippet = $eventArgs->getObject()) instanceof Snippet) {
                        //Set updated value
                        $snippet->setUpdated(new \DateTime('now'));
                }