Skip to content
Products
Resources
Solutions
Pricing
Contact
Log In
Sign Up
Docs
Getting Started
Configuration
Apps
CODE
How to Add an App
Auth
Docs
How to Add an App
On this page

How to Add an App

File-based steps to add a PHP module (app) in UNA 15, covering folder layout, install SQL, forms, pages, nav, Polyglot, alerts, and hooks.
Android
iOS
Web
Core
~15.0
Source
Copy Page
Note
Important
'type' => BX_DOL_MODULE_TYPE_MODULE,
'name' => 'bx_quoteofday',
'title' => 'Quote of the Day',
'version' => '15.0.1.DEV',
'home_dir' => 'boonex/quoteofday/',
'home_uri' => 'quoteofday',
'db_prefix' => 'bx_quoteofday_',
'class_prefix' => 'BxQuoteOfDay',
'language_category' => 'Quote Of Day',
INSERT INTO `sys_std_pages`(`index`, `name`, `header`, `caption`, `icon`) VALUES
(3, @sName, '_bx_quoteofday', '_bx_quoteofday', 'bx_quoteofday@modules/boonex/quoteofday/|std-icon.svg');

SET @iPageId = LAST_INSERT_ID();

INSERT INTO `sys_std_widgets` (`page_id`, `module`, `type`, `url`, `click`, `icon`, `caption`, `cnt_notices`, `cnt_actions`, `featured`)
VALUES(@iPageId, @sName, 'content', '{url_studio}module.php?name=bx_quoteofday', '', 'bx_quoteofday@modules/boonex/quoteofday/|std-icon.svg', '_bx_quoteofday', '', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:11:"get_actions";s:6:"params";a:0:{}s:5:"class";s:18:"TemplStudioModules";}', 0);
bx_alert('bx_posts', 'add', $iPostId, $iProfileId, [
	'content' => $sContent,
	'title' => $sTitle,
	'module' => $this->_oConfig->getName(),
]);
INSERT INTO `sys_alerts_handlers` (`name`, `class`, `file`, `service_call`) VALUES
(@sName, 'BxQuoteOfDayAlertsResponse', 'modules/boonex/quoteofday/classes/BxQuoteOfDayAlertsResponse.php', '');
SET @iHandler := LAST_INSERT_ID();

INSERT INTO `sys_alerts` (`unit`, `action`, `handler_id`) VALUES
('system', 'save_setting', @iHandler);
'relations' => array(
	'bx_timeline',
	'bx_notifications'
),
12d
On this page
Before you startFolder layoutNaming in install/config.phpClassesInstall SQLInstall vs enable vs ActiveFormsPagesNavigationPolyglotAlertsHooks, services, and relationsPermissionsWorked example checklist (Quote of the Day)After Install: Studio buildersRelated
Auto
'type' => BX_DOL_MODULE_TYPE_MODULE,
'name' => 'bx_quoteofday',
'title' => 'Quote of the Day',
'version' => '15.0.1.DEV',
'home_dir' => 'boonex/quoteofday/',
'home_uri' => 'quoteofday',
'db_prefix' => 'bx_quoteofday_',
'class_prefix' => 'BxQuoteOfDay',
'language_category' => 'Quote Of Day',
INSERT INTO `sys_std_pages`(`index`, `name`, `header`, `caption`, `icon`) VALUES
(3, @sName, '_bx_quoteofday', '_bx_quoteofday', 'bx_quoteofday@modules/boonex/quoteofday/|std-icon.svg');

SET @iPageId = LAST_INSERT_ID();

INSERT INTO `sys_std_widgets` (`page_id`, `module`, `type`, `url`, `click`, `icon`, `caption`, `cnt_notices`, `cnt_actions`, `featured`)
VALUES(@iPageId, @sName, 'content', '{url_studio}module.php?name=bx_quoteofday', '', 'bx_quoteofday@modules/boonex/quoteofday/|std-icon.svg', '_bx_quoteofday', '', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:11:"get_actions";s:6:"params";a:0:{}s:5:"class";s:18:"TemplStudioModules";}', 0);
INSERT INTO `sys_alerts_handlers` (`name`, `class`, `file`, `service_call`) VALUES
(@sName, 'BxQuoteOfDayAlertsResponse', 'modules/boonex/quoteofday/classes/BxQuoteOfDayAlertsResponse.php', '');
SET @iHandler := LAST_INSERT_ID();

INSERT INTO `sys_alerts` (`unit`, `action`, `handler_id`) VALUES
('system', 'save_setting', @iHandler);