Release 2.35 (#5470)
* open up API for plugins by removing internal * use constants in entity column definition * simplified entity management API * bump packages * allow installing assets and run database migrations independently * bump to apidoc-bundle 5 * do not duplicate http method in API operationId * new security entries in Open API definition * changed API UI provider for Swagger to Stoplight, improved endpoint titles, hide internal endpoints * deactivate swagger json endpoint
This commit is contained in:
@@ -55,6 +55,18 @@ class ActivityService
|
||||
return $activity;
|
||||
}
|
||||
|
||||
public function saveActivity(Activity $activity): Activity
|
||||
{
|
||||
if ($activity->isNew()) {
|
||||
return $this->saveNewActivity($activity); // @phpstan-ignore method.deprecated
|
||||
} else {
|
||||
return $this->updateActivity($activity); // @phpstan-ignore method.deprecated
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since 2.35 - use saveActivity() instead
|
||||
*/
|
||||
public function saveNewActivity(Activity $activity): Activity
|
||||
{
|
||||
if (null !== $activity->getId()) {
|
||||
@@ -89,6 +101,9 @@ class ActivityService
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since 2.35 - use saveActivity() instead
|
||||
*/
|
||||
public function updateActivity(Activity $activity): Activity
|
||||
{
|
||||
$this->validateActivity($activity);
|
||||
|
||||
Reference in New Issue
Block a user