Class JModuleHelper. Joomla legacy


JModelLegacy *Документация по Joomla 3.0.2

Вернуться к записям по теме Joomla.

Joomla.Legacy\JModelLegacy

libraries/legacy/model/legacy.php at line 22 JObject└─JModelLegacy All Known Subclasses: Joomla.Administrator\AdminModelHelp Joomla.Administrator\AdminModelSysInfo Joomla.Site\BannersModelBanner Joomla.Site\ContactModelCategories Joomla.Site\ContentModelCategories Joomla.Administrator\FinderModelIndexer Joomla.Administrator\FinderModelStatistics Joomla.Installation\InstallationModelConfiguration Joomla.Installation\InstallationModelDatabase Joomla.Installation\InstallationModelFtp Joomla.Installation\InstallationModelSetup Joomla.Administrator\InstallerModelInstall JModelForm JModelItem JModelList Joomla.Administrator\JoomlaupdateModelDefault Joomla.Administrator\LanguagesModelStrings Joomla.Administrator\LoginModelLogin Joomla.Administrator\MediaModelList Joomla.Administrator\MediaModelManager Joomla.Administrator\MenusModelMenutypes Joomla.Site\NewsfeedsModelCategories Joomla.Site\SearchModelSearch Joomla.Administrator\TemplatesModelTemplate Joomla.Site\WeblinksModelCategories

public abstract class JModelLegacyextends JObject

Subpackage: Model Since: 12.2 Field Summary
protected boolean

$__state_set

Indicates if the internal state has been set

protected object

$_db

Database Connector

protected string

$event_clean_cache

The event to trigger when cleaning cache.

protected string

$name

The model (base) name

protected string

$option

The URL option for the component.

protected string

$state

A state object

Fields inherited from Joomla.Platform\JObject
_errors
Constructor Summary
void

__construct(array config, mixed properties)

Constructor

Method Summary
static array

addIncludePath(mixed path, string prefix)

Add a directory where JModelLegacy should search for models.

static void

addTablePath(mixed path)

Adds to the stack of model table paths in LIFO order.

protected static string

_createFileName(string type, array parts)

Create the filename for a resource

static mixed

getInstance(string type, string prefix, array config)

Returns a Model object, always creating it

protected array

_getList(string query, integer limitstart, integer limit)

Gets an array of objects from the results of database query.

protected integer

_getListCount(string query)

Returns a record count for the query

protected mixed

_createTable(string name, string prefix, array config)

Method to load and return a model object.

JDatabaseDriver

getDbo()

Method to get the database driver object

string

getName()

Method to get the model nameThe model name.

object

getState(string property, mixed default)

Method to get model state variables

JTable

getTable(string name, string prefix, array options)

Method to get a table object, load it if necessary.

protected void

populateState()

Method to auto-populate the model state.

void

setDbo(JDatabaseDriver db)

Method to set the database driver object

mixed

setState(string property, mixed value)

Method to set model state variables

protected void

cleanCache(string group, integer client_id)

Clean the cache

Field Detail

libraries/legacy/model/legacy.php at line 30

__state_set

protected boolean $__state_set = null

Indicates if the internal state has been set

Since: 12.2 libraries/legacy/model/legacy.php at line 38

_db

protected object $_db

Database Connector

Since: 12.2 libraries/legacy/model/legacy.php at line 70

event_clean_cache

protected string $event_clean_cache = null

The event to trigger when cleaning cache.

Since: 12.2 libraries/legacy/model/legacy.php at line 46

name

protected string $name

The model (base) name

Since: 12.2 libraries/legacy/model/legacy.php at line 54

option

protected string $option = null

The URL option for the component.

Since: 12.2 libraries/legacy/model/legacy.php at line 62

state

protected string $state

A state object

Since: 12.2

Constructor Detail

libraries/legacy/model/legacy.php at line 209

__construct

public void __construct(array config, mixed properties)

Constructor

Parameters: config - An array of configuration options (name, state, dbo, table_path, ignore_request). Since: 12.2 Throws: Exception

Method Detail

libraries/legacy/model/legacy.php at line 83

addIncludePath

public static array addIncludePath(mixed path, string prefix)

Add a directory where JModelLegacy should search for models. You may either pass a string or an array of directories.

Parameters: path - A path or array[sting] of paths to search. prefix - A prefix for models. Returns: An array with directory elements. If prefix is equal to '', all directories are returned. Since: 12.2 libraries/legacy/model/legacy.php at line 129

addTablePath

public static void addTablePath(mixed path)

Adds to the stack of model table paths in LIFO order.

Parameters: path - The directory as a string or directories as an array to add. Since: 12.2 libraries/legacy/model/legacy.php at line 144

_createFileName

protected static string _createFileName(string type, array parts)

Create the filename for a resource

Parameters: type - The resource type to create the filename for. parts - An associative array of filename information. Returns: The filename Since: 12.2 libraries/legacy/model/legacy.php at line 169

getInstance

public static mixed getInstance(string type, string prefix, array config)

Returns a Model object, always creating it

Parameters: type - The model type to instantiate prefix - Prefix for the model class name. Optional. config - Configuration array for model. Optional. Returns: A model object or false on failure Since: 12.2 libraries/legacy/model/legacy.php at line 297

_getList

protected array _getList(string query, integer limitstart, integer limit)

Gets an array of objects from the results of database query.

Parameters: query - The query. limitstart - Offset. limit - The number of records. Returns: An array of results. Since: 12.2 Throws: RuntimeException libraries/legacy/model/legacy.php at line 314

_getListCount

protected integer _getListCount(string query)

Returns a record count for the query

Parameters: query - The query. Returns: Number of rows for query Since: 12.2 libraries/legacy/model/legacy.php at line 334

_createTable

protected mixed _createTable(string name, string prefix, array config)

Method to load and return a model object.

Parameters: name - The name of the view prefix - The class prefix. Optional. config - Configuration settings to pass to JTable::getInstance Returns: Model object or boolean false if failed Since: 12.2 See Also: JTable::getInstance libraries/legacy/model/legacy.php at line 354

getDbo

public JDatabaseDriver getDbo()

Method to get the database driver object

libraries/legacy/model/legacy.php at line 370

getName

public string getName()

Method to get the model name

The model name. By default parsed using the classname or it can be set by passing a $config['name'] in the class constructor

Returns: The name of the model Since: 12.2 Throws: Exception libraries/legacy/model/legacy.php at line 395

getState

public object getState(string property, mixed default)

Method to get model state variables

Parameters: property - Optional parameter name default - Optional default value Returns: The property where specified, the state object where omitted Since: 12.2 libraries/legacy/model/legacy.php at line 421

getTable

public JTable getTable(string name, string prefix, array options)

Method to get a table object, load it if necessary.

Parameters: name - The table name. Optional. prefix - The class prefix. Optional. options - Configuration array for model. Optional. Returns: A JTable object Since: 12.2 Throws: Exception libraries/legacy/model/legacy.php at line 448

populateState

protected void populateState()

Method to auto-populate the model state.

This method should only be called once per instantiation and is designed to be called on the first call to the getState() method unless the model configuration flag to ignore the request is set.

Note: Calling getState in this method will result in recursion. Since: 12.2 libraries/legacy/model/legacy.php at line 461

setDbo

public void setDbo(JDatabaseDriver db)

Method to set the database driver object

Parameters: db - A JDatabaseDriver based object Since: 12.2 libraries/legacy/model/legacy.php at line 476

setState

public mixed setState(string property, mixed value)

Method to set model state variables

Parameters: property - The name of the property. value - The value of the property to set or null. Returns: The previous value of the property or null if not set. Since: 12.2 libraries/legacy/model/legacy.php at line 491

cleanCache

protected void cleanCache(string group, integer client_id)

Clean the cache

Parameters: group - The cache group client_id - The ID of the client Since: 12.2 Вернуться к записям по теме Joomla.

ya.samposebe.ru

Joomla.Legacy *Документация по Joomla 3.0.2

Function Summary
addToStackMethod to add non-JError thrown JExceptions to the JError stack for debugging purposes
attachHandlerMethod that attaches the error handler to JError
customErrorHandlerDisplay a message to the user
customErrorPageDisplay a custom error page and exit gracefully
detachHandlerMethod that detaches the error handler from JError
getErrorMethod for retrieving the last exception object in the error stack
getErrorHandlingMethod to get the current error handler settings for a specified error level.
getErrorsMethod for retrieving the exception stack
handleCallbackCallback error handler - Send the error object to a callback method for error handling
handleDieDie error handler - Echos the error message to output and then dies
handleEchoEcho error handler - Echos the error message to output
handleIgnoreIgnore error handler - Ignores the error
handleLogLog error handler Logs the error message to a system log file
handleMessageMessage error handler Enqueues the error message into the system queue
handleVerboseVerbose error handler - Echos the error message to output as well as related info
raiseCreate a new JException object given the passed arguments
raiseErrorWrapper method for the raise() method with predefined error level of E_ERROR and backtrace set to true.
raiseNoticeWrapper method for the raise() method with predefined error level of E_NOTICE and backtrace set to false.
raiseWarningWrapper method for the raise() method with predefined error level of E_WARNING and backtrace set to false.
registerErrorLevelMethod to register a new error level for handling errorsThis allows you to add custom error levels to the built-in E_NOTICE E_WARNING - E_NOTICE
renderBacktraceRender the backtrace
setErrorHandlingMethod to set the way the JError will handle different error levels.
throwErrorThrow an error
translateErrorLevelTranslate an error level integer to a human readable string e.g.

ya.samposebe.ru

JModuleHelper *Документация по Joomla 3.0.2

Вернуться к записям по теме Joomla.

Joomla.Legacy\JModuleHelper

libraries/legacy/module/helper.php at line 19 JModuleHelper

public abstract class JModuleHelper

Subpackage: Module Since: 11.1 Method Summary
static object

getModule(string name, string title)

Get module by name (real, eg 'Breadcrumbs' or folder, eg 'mod_breadcrumbs')

static array

getModules(string position)

Get modules by position

static boolean

isEnabled(string module)

Checks if a module is enabled

static string

renderModule(object module, array attribs)

Render the module.

static string

getLayoutPath(string module, string layout)

Get the path to a layout for a module

protected static array

_load()

Load published modules.

static string

moduleCache(object module, object moduleparams, object cacheparams)

Module cache helperCaching modes: To be set in XML: 'static' One cache file for all pages with the same module parameters 'oldstatic' 1.5 definition of module caching, one cache file for all pages with the same module id and user aid, 'itemid' Changes on itemid change, to be called from inside the module: 'safeuri' Id created from $cacheparams->modeparams array, 'id' Module sets own cache id's

Method Detail

libraries/legacy/module/helper.php at line 31

getModule

public static object getModule(string name, string title)

Get module by name (real, eg 'Breadcrumbs' or folder, eg 'mod_breadcrumbs')

Parameters: name - The name of the module title - The title of the module, optional Returns: The Module object Since: 11.1 libraries/legacy/module/helper.php at line 78

getModules

public static array getModules(string position)

Get modules by position

Parameters: position - The position of the module Returns: An array of module objects Since: 11.1 libraries/legacy/module/helper.php at line 118

isEnabled

public static boolean isEnabled(string module)

Checks if a module is enabled

Parameters: module - The module name Since: 11.1 libraries/legacy/module/helper.php at line 135

renderModule

public static string renderModule(object module, array attribs)

Render the module.

Parameters: module - A module object. attribs - An array of attributes for the module (probably from the XML). Returns: The HTML content of the module output. Since: 11.1 libraries/legacy/module/helper.php at line 256

getLayoutPath

public static string getLayoutPath(string module, string layout)

Get the path to a layout for a module

Parameters: module - The name of the module layout - The name of the module layout. If alternative layout, in the form template:filename. Returns: The path to the module layout Since: 11.1 libraries/legacy/module/helper.php at line 297

_load

protected static array _load()

Load published modules.

Since: 11.1 libraries/legacy/module/helper.php at line 419

moduleCache

public static string moduleCache(object module, object moduleparams, object cacheparams)

Module cache helper

Caching modes: To be set in XML: 'static' One cache file for all pages with the same module parameters 'oldstatic' 1.5 definition of module caching, one cache file for all pages with the same module id and user aid, 'itemid' Changes on itemid change, to be called from inside the module: 'safeuri' Id created from $cacheparams->modeparams array, 'id' Module sets own cache id's

Parameters: module - Module object moduleparams - Module parameters cacheparams - Module cache parameters - id or url parameters, depending on the module cache mode Since: 11.1 See Also: JFilterInput::clean() Вернуться к записям по теме Joomla.

ya.samposebe.ru


Prostoy-Site | Все права защищены © 2018 | Карта сайта