-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from wayofdev/feat/save-entity
feat: add remove method
- Loading branch information
Showing
7 changed files
with
136 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -160,4 +160,18 @@ final public function deleteOrFail(bool $cascade = true): StateInterface | |
|
||
return $entityManager->run(); | ||
} | ||
|
||
/** | ||
* Prepares the current entity for deletion. | ||
* | ||
* @throws ContainerExceptionInterface | ||
* @throws NotFoundExceptionInterface | ||
*/ | ||
final public function remove(bool $cascade = true): EntityManagerInterface | ||
Check warning on line 170 in src/ActiveRecord.php GitHub Actions / mutation-testing (ubuntu-latest, 8.2, locked)
|
||
{ | ||
/** @var EntityManager $entityManager */ | ||
$entityManager = Facade::getEntityManager(); | ||
|
||
return $entityManager->delete($this, $cascade); | ||
} | ||
} |
File renamed without changes.
Oops, something went wrong.