PHP code example of actiane / entity-change-watch-bundle

1. Go to this page and download the library: Download actiane/entity-change-watch-bundle library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

actiane / entity-change-watch-bundle example snippets


class MyEntityService
{
    public function doSomething(MyEntity $myEntity)
    {
        /*
        
        do something
        */
    }
    
    public function doSomethingBeforeFlush(MyEntity $myEntity)
    {
        /*
        
        do something before the flush
        */
    }
    
    public function doSomethingElse(MyEntity $myEntity, array $changedProperties, EntityManagerInterface $entityManager)
    {
        /*
        
        do something else
        */
    }