Skip to content
Products
Apps
Docs
Log in
Log in
Sign up
Sign up
Products
Apps
Docs
Docs
Docs
CODE
On this page

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.
Android
iOS
Web
Core
Client
~15.0
Source
Copy Page
Note
Tip
Tip
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&params=[123]
Tip
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
On this page
Request entryModulesStart a new moduleMigrationsStudio buildersAlertsCatch an alertService callsAPIAPI v2 previewPHP templates and MixesDebug and logsTestsTroubleshooting
Introduction
Getting Started
Configuration
Apps
CODE
Developer Architecture
Code Convention
Code Quality
Directory Structure
How to Add an App
Storage System
Common Mistakes
Payment Provider Integration
Module API
iOS Client
NEO Developer
Android Client
Web Client
Contributing
REST API
Analytics Developer
Auth
Connect
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);