Developer Architecture
How a PHP module plugs into UNA 15: URL entry points, module layout, migrations, Studio builders, alerts, service calls, /api.php and the API v2 preview, templates, debug and tests. bx_alert('my_module', 'added', $iContentId, $iAuthorProfileId, [
'object_author_id' => $iAuthorProfileId,
]);
INSERT INTO `sys_alerts_handlers` (`name`, `class`, `file`, `service_call`) VALUES
('bx_posts', 'BxPostsAlertsResponse', 'modules/boonex/posts/classes/BxPostsAlertsResponse.php', '');
SET @iHandler := LAST_INSERT_ID();
INSERT INTO `sys_alerts` (`unit`, `action`, `handler_id`) VALUES
('system', 'save_setting', @iHandler),
('profile', 'delete', @iHandler);
$aPost = bx_srv('bx_posts', 'get_timeline_post', [$aEvent]);
/api.php?r=bx_posts/module_icon
/api.php?r=bx_posts/get_link¶ms=[123]
composer install
composer test # or: phing test, or ./plugins/bin/phpunit -c tests/phpunit.xml
composer test-units # Units suite only
composer test-integration # Integration suite only
docker compose exec -w /opt/una php ./plugins/bin/phpunit -c tests/phpunit.xml --testsuite Units
11d