src/Event/Model/ModelAfterSaveListener.php
protected function isRequiredModified(EntityInterface $entity, array $requiredFields) : bool
    {
        foreach ($requiredFields as $field) {
            if ($entity->isDirty($field)) {
                return true;
            }
        }

        return false;
    }
protected function isRequiredModified(EntityInterface $entity, array $requiredFields) : bool
    {
        foreach ($requiredFields as $field) {
            if ($entity->isDirty($field)) {
                return true;
            }
        }

        return false;
    }
protected function isRequiredModified ( EntityInterface $ entity , array $ requiredFields ) : bool { foreach ( $ requiredFields as $ field ) { if ( $ entity -> isDirty ( $ field ) ) { return true ; } } return false ; }
Check that required entity fields are modified

Entities are modified all the time and we don't always want
to send a notification about these changes.  Instead, here
we check that particular fields were modified (usually the
reminder datetime field or the attendees of the event).

@param \Cake\Datasource\EntityInterface $entity Entity instance
@param string[] $requiredFields Required fields list
@return bool
Check that required entity fields are modified