Class ModuleTypes
-
Model
-
AppModel
uses
Blesta\Core\Util\Common\Traits\Container
-
ModuleTypes
Methods summary
public
|
#
__construct( )
Initialize ModuleTypes
Overrides
|
public
stdClass
|
#
get( integer $type_id )
Fetches a single module type
Fetches a single module type
Parameters
- $type_id
- The ID of the module type to fetch
Returns
stdClass A class containing the id and name of the module type
|
public
stdClass
|
#
getByName( string $name )
Fetches a single module type by it's name
Fetches a single module type by it's name
Parameters
- $name
- The name of the module type to fetch
Returns
stdClass A class containing the id and name of the module type
|
public
array
|
#
getAll( string $sort_by = 'name', string $order = 'asc' )
Fetches all the module types available in the system
Fetches all the module types available in the system
Parameters
- $sort_by
- The field to sort by
- $order
- The direction to order results
Returns
array A numerically indexed array containing the module types
|
public
array
|
#
getList( )
Returns a list of all module types on the system
Returns a list of all module types on the system
Returns
array A list of all module types
|
public
integer
|
#
add( array $vars )
Adds a new module type to the system
Adds a new module type to the system
Parameters
- $vars
An array of module type data including:
- name The name of the new module type
Returns
integer The ID of the module type, void on error
|
public
|
#
delete( integer $type_id )
Deletes a module type
Parameters
- $type_id
- The ID of the module type to delete
|
public
|
#
deleteByName( string $name )
Deletes a module type by it's name
Deletes a module type by it's name
Parameters
- $name
- The module type name to delete
|
public
|
#
edit( integer $type_id, array $vars )
Updates an existing module type
Updates an existing module type
Parameters
- $type_id
- The id of the module type to update
- $vars
An array of module type data including:
- name The name of the new module type
|
public
array
|
#
getDefaultTypes( )
Returns a list of default module types
Returns a list of default module types
Returns
array A list of default module types
|
Methods inherited from AppModel
_(),
boolToInt(),
currencyToDecimal(),
dateToUtc(),
errors(),
getPerPage(),
ifSet(),
loadCrypto(),
setDefaultIfEmpty(),
setPerPage(),
setRulesIfSet(),
strToBool(),
systemDecrypt(),
systemEncrypt(),
systemHash(),
truncateDecimal(),
validateExists(),
validateStateCountry()
|