ExpressionEngine Docs

Addon Module Model

class ExpressionEngine\Model\Addon\Module

Properties

Name Validation Type Description
module_id
module_name Human-readable name of the Module.
module_version Module’s version number.
has_cp_backend enum[y,n] boolString Shows the option to see addon’s settings.
has_publish_fields enum[y,n] boolString Whether module provides tab for entry edit page

Relationships

Methods

This model has no additional methods.

Events

This model has no events.

Examples

Change a module’s name.

$module = ee('Model')
            ->get('Module')
            ->filter('module_name', 'Old Module Name')
            ->first();

$module->module_name = 'My New Module Name';

// Validation would not check the name, so not required.
$module->save();