Introduction to the Manifest
Overview
Module loadable packages rely on a manifest.php
file to define the basic properties and installation steps for the package. This documentation explains the various components that make up the manifest file.
Note: Sugar Sell Essentials customers do not have the ability to upload custom file packages to Sugar using Module Loader.
Manifest Definitions
Inside of the manifest.php
file, there is a $manifest
variable that defines the basic properties of the module loadable package. The various manifest properties are outlined below:
Name | Type | Displayed in Module Loader |
Description |
key |
String | No | A unique identifier for the package
|
name |
String | Yes | The name of the package
|
description |
String | Yes | The description of the package
|
built_in_version |
String | No | The version of Sugar that the package was designed for
Note: Some packages designed for 6.x versions of Sugar are not compatible with 14.0 and should not be installed. |
version |
String | Yes | The version of the package, i.e. "1.0.0"
Note: The version string should be formatting according to the Semantic Versioning 2.0 standard. |
acceptable_sugar_versions |
Array | No | The Sugar versions that a package can be installed to
Note: You can define exact versions and/or use a regex formula to define a range. Exact versions will be specified using the exact_matches index and will contain an array of exact version strings (i.e. '14.0.0'). Regex formulas will be specified using the regex_matches index and will contain an array of regular expressions designed to match a group of versions (i.e. '14.0.*'). |
acceptable_sugar_flavors |
Array | No | The Sugar products that the package can be installed to
|
author |
String | No | The author of the package (i.e. "SugarCRM")
|
readme |
String | No | The optional path to a readme document to be displayed to the user during installation
|
icon |
String | No | The optional path (within the package ZIP file) to an icon image to be displayed during installation (e.g. ./patch_directory/icon.gif and ./patch_directory/images/theme.gif )
|
is_uninstallable |
Boolean | No | Whether or not the package can be uninstalled Acceptable values:
|
published_date |
String | No | The date the package was published
|
remove_tables |
String | No | Whether or not tables generated by the $installdefs['beans'] index should be removed from an installed module (acceptable values: empty or 'prompt')
|
type |
String | No | Acceptable 'type' values:
|
dependencies |
Array | No |
Required dependency packages:
|
uninstall_before_upgrade |
Boolean | No |
This will allow Module Loader to ensure all traces of previously installed package versions (including packages that have been upgraded multiple times) have been removed.
|
Manifest Example
An example of a manifest is shown below:
$manifest = array(
'key' => 1397052912,
'name' => 'My manifest',
'description' => 'My description',
'author' => 'SugarCRM',
'version' => '1.0.0',
'is_uninstallable' => true,
'published_date' => '04/05/2024 14:15:12',
'type' => 'module',
'acceptable_sugar_versions' =>
array(
'exact_matches' => array(
'14.0.0'
),
//or
'regex_matches' => array(
'14.0.*' //any 14.0 release
),
),
'acceptable_sugar_flavors' =>
array(
'PRO',
'ENT',
'ULT'
),
'readme' => '',
'icon' => '',
'remove_tables' => '',
'uninstall_before_upgrade' => false,
);
Installation Definitions
The following section outlines the indexes specified in the $installdefs
array contained in the ./manifest.php
file. The $installdefs
array indexes are used by the Module Loader to determine the actual installation steps that need to be taken to install the package.
$installdef Actions
Name | Type | Description |
action_file_map |
Array | ActionFileMap is part of the Extension Framework. More detail can be found in the Extension Framework documentation. |
action_remap |
Array | ActionReMap is part of the Extension Framework. More detail can be found in the Extension Framework documentation. |
action_view_map |
Array | ActionViewMap is part of the Extension Framework. More detail can be found in the Extension Framework documentation. |
administration |
Array | Administration is part of the Extension Framework. More detail can be found in the Extension Framework documentation. |
appscheduledefs |
Array | Application ScheduledTasks is part of the Extension Framework. More detail can be found in the Extension Framework documentation. |
beans |
Array | Modules is part of the Extension Framework. More detail can be found in the Extension Framework documentation. |
connectors |
Array |
An array containing Connector definitions as outlined in the Connector documentation.
|
copy |
Array | An array detailing the files and folders to be copied to Sugar Required parameters for each file in the array:
|
csp |
Array |
CSP directives needed for proper operation of the package should be represented as an associative array
This parameter takes a space-delimited string of domains - just like the admin module. Setting the value of the |
custom_fields |
Array | An array of custom fields to be installed for the new module Required sub-directives for each custom field formatted as:
Example:
|
console |
Array | Console is part of the Extension Framework. More detail can be found in the Extension Framework documentation. |
dashlets |
Array |
An array containing the Dashlet definition. Required parameters for each file in the array:
|
dependencies |
Array | Dependencies is part of the Extension Framework. More detail can be found in the Extension Framework documentation. |
entrypoints |
Array | EntryPointRegistry is part of the Extension Framework. More detail can be found in the Extension Framework documentation. |
extensions |
Array | Extensions is part of the Extension Framework. More detail can be found in the Extension Framework documentation. |
file_access |
Array | FileAccessControlMap is part of the Extension Framework. More detail can be found in the Extension Framework documentation. |
hookdefs |
Array | LogicHooks is part of the Extension Framework. More detail can be found in the Extension Framework documentation. |
id |
String | A unique id for the installdef definition
|
image_dir |
String | The directory that contains the icons for the module
|
jsgroups |
Array | JSGroupings is part of the Extension Framework. More detail can be found in the Extension Framework documentation. |
language |
Array | Language is part of the Extension Framework. More detail can be found in the Extension Framework documentation. |
layoutdefs |
Array | Layoutdefs is part of the Extension Framework. More detail can be found in the Extension Framework documentation. |
layoutfields |
Array |
An array of custom fields to be added to the edit and detail views of the target modules' existing layouts |
logic_hooks |
Array |
An array containing full logic Hook definitions, as outlined in the LogicHook documentation.
LogicHooks defined for install using the
Note: You will still need to utilize a |
platforms |
Array |
Platforms is part of the Extension Framework. More detail can be found in the Extension Framework documentation. |
pre_execute |
Array | Executes logic from a file (or set of files) before a package is installed Example:
Where the content of <basepath>/pre_execute.php is:
|
post_execute |
Array | Executes logic from a file (or set of files) after a package is installed Example:
Where the content of <basepath>/post_execute.php is:
|
pre_uninstall |
Array | Executes logic from a file (or set of files) before a package is uninstalled Example:
Where the content of <basepath>/pre_uninstall.php is:
|
post_uninstall |
Array | Executes logic from a file (or set of files) after a package is uninstalled Example:
Where the content of <basepath>/post_uninstall.php is:
|
relationships |
Array | An array of relationship files used to link the new modules to existing modules Note: A metadata path must be defined using meta_data (string):
Where the content of my_module_accountsMetaData.php is:
|
scheduledefs |
Array | ScheduledTasks is part of the Extension Framework. More detail can be found in the Extension Framework documentation. |
sidecar |
Array | Sidecar is part of the Extension Framework. More detail can be found in the Extension Framework documentation. |
tinymce |
Array | TinyMCE is part of the Extension Framework. More detail can be found in the Extension Framework documentation. |
user_page |
Array | UserPage is part of the Extension Framework. More detail can be found in the Extension Framework documentation. |
utils |
Array | Utils is part of the Extension Framework. More detail can be found in the Extension Framework documentation. |
vardefs |
Array | Vardefs is part of the Extension Framework. More detail can be found in the Extension Framework documentation. |
wireless_modules |
Array | WirelessModuleRegistery is part of the Extension Framework. More detail can be found in the Extension Framework documentation. |
wireless_subpanels |
Array | WirelessLayoutDefs is part of the Extension Framework. More detail can be found in the Extension Framework documentation. |
Note: Anything printed to the screen in the pre_execute, post_execute, pre_uninstall, or post_uninstall scripts will be displayed when clicking on the Display Log link.