Send notifications to all users of one or more spaces about a publication.
To use translations customized in the space's module settings, use the t() function of the Mn model. The $message param must be created by the Yii::t() function in order to have automatic messages creations with the yii message/extract-module function. But this $message param must be in english without replacement of the placeholders, so use , [], 'en' params in the Yii::t() function. E.g.:
$mn = new Mn(['space' => $this->space]);
echo $mn->t('notification', Yii::t('MassNotificationModule.notification', 'Message from {displayName}:', [], 'en'), ['displayName' => $user->getDisplayName()]);
If minimal HumHub version changes, update the PHP version in composer.json to the minimal PHP version for this HumHub and update: composer update
For a git based installation you'll need a composer install on the module root in order to fetch dependencies.
The unit tests (Codeception) need a HumHub checkout with a test database (see the HumHub documentation about testing):
cd tests
php /path/to/humhub/protected/vendor/bin/codecept run unit
By default, the module is expected at protected/modules_cuzy/mass_notification of the HumHub checkout (see tests/codeception/_bootstrap.php for the humhub_root configuration). In GitHub Actions, the tests are run by the codeception-*.yml workflows from humhub/module-coding-standards.