rapila
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Static Protected Member Functions | Static Protected Attributes | List of all members
Module Class Reference
Inheritance diagram for Module:
AdminModule DocumentationProviderTypeModule FileModule FilterModule FrontendModule PageTypeModule WidgetModule CheckAdminModule DashboardAdminModule DocumentCategoriesAdminModule DocumentsAdminModule DocumentTypesAdminModule GroupsAdminModule InstallerAdminModule LanguagesAdminModule LinkCategoriesAdminModule LinksAdminModule PagesAdminModule RolesAdminModule SettingsAdminModule StringsAdminModule TagsAdminModule UsersAdminModule JsonBasedDocumentationProviderTypeModule StaticDocumentationProviderTypeModule ConsolidatedResourceFileModule DisplayDocumentFileModule DocumentTypePreviewFileModule FormFileModule LicenseImageFileModule ListExportFileModule LocalJsLibraryFileModule NamespacedPreviewCssFileModule TemplateResourceFileModule TestErrorPageFileModule TestReferencesFileModule WidgetJsonFileModule CategorySubpagesFilterModule CategorySubpagesFrontendModule DynamicFrontendModule EmptyFrontendModule MediaObjectFrontendModule TextFrontendModule DefaultPageTypeModule DashboardControlWidgetModule DetailWidgetModule DocumentationDisplayWidgetModule DocumentCategoryInputWidgetModule ExternallyManagedInputWidgetModule FileUploadWidgetModule GroupInputWidgetModule InfoBarWidgetModule LanguageTabsWidgetModule LinkCategoryInputWidgetModule LinkInputWidgetModule ModelDragAndDropWidgetModule PageInputWidgetModule PermissionWidgetModule PersistentWidgetModule RoleInputWidgetModule SidebarInputWidgetModule SpecializedListWidgetModule StringWidgetModule TagPanelWidgetModule TimezoneInputWidgetModule

Public Member Functions

 getModuleName ()
 
 getModuleInfo ($sSetting=null)
 
 getDisplayName ($sLanguageId=null)
 

Static Public Member Functions

static getModuleInstanceByTypeAndName ($sType, $sName)
 
static getClassNameByTypeAndName ($sType, $sName= '')
 
static getDisplayNameByTypeAndName ($sType, $sName, $sLanguageId=null)
 
static getPathArrayByTypeAndName ($sType, $sName)
 
static getModuleInfoByTypeAndName ($sType, $sName)
 
static isModuleEnabled ($sType, $sName)
 
static getDefaultRolesForModule ()
 
static isModuleAllowed ($sType, $sName, $oUser=null)
 
static getModuleMetadataByTypeAndName ($sType, $sName)
 
static moduleExists ($sModuleName, $sType=null)
 
static listModulesByType ($sType, $bListEnabledOnly=true)
 
static listModulesByTypeAndAspect ($sType, $sAspect, $bListEnabledOnly=true)
 
static listModuleTypes ()
 
static listAllModules ($bListEnabledOnly=true)
 
static getType ()
 
static listModules ($bListEnabledOnly=true)
 
static listModulesByAspect ($sAspect, $bListEnabledOnly=true)
 
static getClassNameByName ($sModuleName)
 
static getNameByClassName ($sClassName)
 
static getDisplayNameByName ($sModuleName, $sLangugaeId=null)
 
static getModuleInstance ($sModuleName)
 
static moduleName ()
 
static isValidModuleClassName ($sName)
 
static isValidModuleClassNameOfAnyType ($sName)
 
static isSingleton ()
 

Public Attributes

const INFO_FILE = FILENAME_INFO
 

Protected Member Functions

 constructTemplate ($sTemplateName=null, $bForceGlobalTemplatesDir=false)
 

Static Protected Member Functions

static constructTemplateForModuleAndType ($sModuleType, $sModuleName, $sTemplateName=null, $bForceGlobalTemplatesDir=false)
 
static template ($sTemplateName=null, $bForceGlobalTemplatesDir=false)
 

Static Protected Attributes

static $MODULE_TYPE
 

Detailed Description

Module is the base class for all modules. There are currently five types of modules: page type, filter, file, frontend and admin modules. Read the description in those files to see what they do. All modules are found in the folder modules/module_type under either the root or site folder

Modules always have the following directory structure:

module_name/
 templates/ (optional, can be read with $this->constructTemplate('name') inside the module)
 lang/ (optional, contains translation files with strings)
 ModuleNameModuleTypeModule.php (contains the actual module code)
 info.yml (optional) contains info about the module as well as permission settings
See also
PageTypeModule
FrontendModule
AdminModule
FileModule
FilterModule

Member Function Documentation

Module::constructTemplate (   $sTemplateName = null,
  $bForceGlobalTemplatesDir = false 
)
protected

Returns an instance of Template loaded from a file in the module's directory (or the directory of the same name in the site/modules dir if the module is internal)

Parameters
string$sTemplateNamethe template name to be used, defaults to the model name
boolean$bForceGlobalTemplatesDirif set to true causes the template to be loaded from the global templates directory (internal or external) instead of the module's local one
static Module::getModuleMetadataByTypeAndName (   $sType,
  $sName 
)
static

Fetches all module metadata (including module info obtained from the info.yml files) and stores it into a static field, returns it


The documentation for this class was generated from the following file: