public
array
|
#
getAddons( )
return an array of available addons
return an array of available addons
Returns
array in this form
array(
"models" => array(
"objectTypes" => array(
"on" => array(
0 => array(
"name" => class name,
"file" => file name,
"objectType" => object type name,
"path" => path where to find addon file available,
"enabledPath" => path where to find addon file enabled,
"type" => "models",
"fileNameUsed" => true if file name is already used for model
),
1 => array()
....
),
"off" => array(
0 => array(
like "on" array
), 1 => array(...)), ...
),
"others" => array(
"on" => array(
0 => array(
"name" => class name,
"file" => file name,
"objectType" => object type name,
"path" => path where to find addon file available,
"enabledPath" => path where to find addon file enabled,
"type" => "models",
"fileNameUsed" => true if file name is already used for model
),
1 => array()
....
),
"off" => array(
0 => array(
like "on" array
), 1 => array(...)), ...
)
),
"components" => array(like "others" array),
"helpers" => array(like "others" array),
"behaviors" => array(like "others" array),
)
|
public
|
#
enable( string $fileName, string $addonType )
enable addon copying the addon file in the related enabled folder.
If addon is a BEdita object type a row on object_types table is created
enable addon copying the addon file in the related enabled folder.
If addon is a BEdita object type a row on object_types table is created
Parameters
- $fileName
- $fileName, addon file name
- $addonType
- $addonType, the type of addon, i.e. models, helpers, components, ...
Throws
|
public
|
#
disable( string $fileName, string $addonType )
disable addon deleting the addon file from the related enabled folder.
If addon is a BEdita object the row on object_types table and all objects of that type are removed
disable addon deleting the addon file from the related enabled folder.
If addon is a BEdita object the row on object_types table and all objects of that type are removed
Parameters
- $fileName
- $fileName, addon file name
- $addonType
- $addonType, the type of addon, i.e. models, helpers, components, ...
Throws
|
public
|
#
update( string $fileName, string $addonType )
update addon overriding the enabled addon file
update addon overriding the enabled addon file
Parameters
- $fileName
- $fileName, addon file name
- $addonType
- $addonType, the type of addon, i.e. models, helpers, components, ...
Throws
|
public
array
|
#
getFolderByFile( string $fileName )
get an array with folders on which $fileName is found starting from BEDITA_ADDONS_PATH
get an array with folders on which $fileName is found starting from BEDITA_ADDONS_PATH
Parameters
- $fileName
- $fileName, the file name
Returns
array
|
public
mixed,
|
#
getFolderByType( string $addonType )
get the folder relative to an addon
get the folder relative to an addon
Parameters
- $addonType
- $addonType, the addon type i.e. model, helper, component,...
Returns
mixed, the folder string or false if folder doesn't found
|
public
mixed,
|
#
getEnabledFolderByType( string $addonType )
get the "enabled" folder relative to an addon
get the "enabled" folder relative to an addon
Parameters
- $addonType
- $addonType, the addon type i.e. model, helper, component,...
Returns
mixed, the folder string or false if folder doesn't found
|