public function onUserEntityPreSave(StorageEvent $event)
    {
        /** @var Entity\Users $entityRecord */
        $entityRecord = $event->getContent();

        if ($entityRecord instanceof Entity\Users) {
            $this->passwordHash($entityRecord);
        }
    }
public function onUserEntityPreSave(StorageEvent $event)
    {
        /** @var Entity\Users $entityRecord */
        $entityRecord = $event->getContent();

        if ($entityRecord instanceof Entity\Users) {
            $this->passwordHash($entityRecord);
        }
    }
public function onUserEntityPreSave ( StorageEvent $ event ) { /** @var Entity\Users $entityRecord */ $ entityRecord = $ event -> getContent ( ) ; if ( $ entityRecord instanceof Entity \ Users ) { $ this -> passwordHash ( $ entityRecord ) ; } }
Pre-save storage event for user entities.

@param StorageEvent $event
Pre - save storage event for user entities .