Let the platform do the work

WirelessModuleRegistry

Overview

The WirelessModuleRegistry extension adds modules to the available modules for mobile.

Properties

The following extension properties are available. For more information, please refer to the Extension Property documentation.

Property Value
Extension Scope Application
Sugar Variable $wireless_module_registry
Extension Directory ./custom/Extension/application/Ext/WirelessModuleRegistry/
Compiled Extension File ./custom/application/Ext/WirelessModuleRegistry/wireless_module_registry.ext.php
Manifest Installdef $installdefs['wireless_modules']

Implementation

The following sections illustrate the various ways to implement a customization to a Sugar instance.

File System

When working directly with the filesystem, you can create a file in ./custom/Extension/application/Ext/WirelessModuleRegistry/ to add modules to the list of available modules for mobile. The following example will add a new module, 'cust_module', to the list of available modules for mobile:

./custom/Extension/application/Ext/WirelessModuleRegistry/<file>.php

<?php 

$wireless_module_registry['cust_module'] = array( 
    //enables/disables record creation 
    'disable_create' => false, 
);

Next, navigate to Admin > Repair > Quick Repair and Rebuild. The system will then rebuild the extensions and compile your customization into ./custom/application/Ext/WirelessModuleRegistry/wireless_module_registry.ext.php.

Module Loadable Package

When building a module loadable package, you can use the $installdefs['wireless_modules'] index to install the extension file.

Installdef Properties

Name Type Description
from String The base path of the file to be installed.
to_module String The key of the module the file is to be installed to.

The example below demonstrates the proper install definition that should be used in the ./manifest.php file in order to add the Wireless Module Registry file to the system. You should note that when using this approach, Sugar will automatically execute Rebuild Extensions to reflect the new module in the mobile application.

./manifest.php

<?php

$manifest = array(
    ...
);

$installdefs = array(
    'id' => 'wirelessModules_Example',
    'wireless_modules' => array(
        array(
            'from' => '<basepath>/Files/custom/Extension/application/Ext/WirelessModuleRegistry/<file>.php',
            'to_module' => 'application',
        )
    )
);

Alternatively, you may use the $installdefs['copy'] index to copy the file. When using this approach, you may need to manually run repair actions such as a Quick Repair and Rebuild. For more information on the $installdefs['copy'] index and module-loadable packages, please refer to the Introduction to the Manifest page.