Class JDocumentHTML. Документация joomla


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

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

Joomla.Platform\JDocument

libraries/joomla/document/document.php at line 21 JDocument All Known Subclasses: JDocumentError JDocumentFeed JDocumentHTML JDocumentImage JDocumentJSON JDocumentOpensearch JDocumentRaw JDocumentXml

public class JDocument

Subpackage: Document Since: 11.1 Field Summary
static mixed (depends on the renderer)

$_buffer

Array of buffered output

string

$_charset

Contains the character encoding string

object

$_engine

The rendering engine

string

$_generator

Document generator

string

$_lineEnd

Contains the line end string

string

$_mdate

Document modified date

array

$_metaTags

Array of meta tags

string

$_mime

Document mime type

string

$_namespace

Document namespace

string

$_profile

Document profile

array

$_script

Array of scripts placed in the header

array

$_scripts

Array of linked scripts

array

$_style

Array of included style declarations

array

$_styleSheets

Array of linked style sheets

string

$_tab

Tab string

string

$_type

The document type

string

$base

Document base URL

string

$description

Document description

string

$direction

Contains the document direction setting

protected static array JDocument instances container.

$instances

string

$language

Contains the document language setting

string

$link

Document full URL

string

$title

Document title

Constructor Summary
void

__construct(array options)

Class constructor.

Method Summary
static object

getInstance(string type, array attributes)

Returns the global JDocument object, only creating it if it doesn't already exist.

JDocument

setType(string type)

Set the document type

string

getType()

Returns the document type

The

getBuffer()

Get the contents of the document buffer

JDocument

setBuffer(string content, array options)

Set the contents of the document buffer

string

getMetaData(string name, boolean httpEquiv)

Gets a meta tag.

JDocument

setMetaData(string name, string content, boolean http_equiv)

Sets or alters a meta tag.

JDocument

addScript(string url, string type, boolean defer, boolean async)

Adds a linked script to the page

JDocument

addScriptDeclaration(string content, string type)

Adds a script to the page

JDocument

addStyleSheet(string url, string type, string media, array attribs)

Adds a linked stylesheet to the page

JDocument

addStyleDeclaration(string content, string type)

Adds a stylesheet declaration to the page

JDocument

setCharset(string type)

Sets the document charset

string

getCharset()

Returns the document charset encoding.

JDocument

setLanguage(string lang)

Sets the global document language declaration.

string

getLanguage()

Returns the document language.

JDocument

setDirection(string dir)

Sets the global document direction declaration.

string

getDirection()

Returns the document direction declaration.

JDocument

setTitle(string title)

Sets the title of the document

string

getTitle()

Return the title of the document.

JDocument

setBase(string base)

Sets the base URI of the document

string

getBase()

Return the base URI of the document.

JDocument

setDescription(string description)

Sets the description of the document

string

getDescription()

Return the title of the page.

JDocument

setLink(string url)

Sets the document link

string

getLink()

Returns the document base url

JDocument

setGenerator(string generator)

Sets the document generator

string

getGenerator()

Returns the document generator

JDocument

setModifiedDate(string date)

Sets the document modified date

string

getModifiedDate()

Returns the document modified date

JDocument

setMimeEncoding(string type, boolean sync)

Sets the document MIME encoding that is sent to the browser.

string

getMimeEncoding()

Return the document MIME encoding that is sent to the browser.

JDocument

setLineEnd(string style)

Sets the line end style to Windows, Mac, Unix or a custom string.

string

_getLineEnd()

Returns the lineEnd

JDocument

setTab(string string)

Sets the string used to indent HTML

string

_getTab()

Returns a string containing the unit for indenting HTML

JDocumentRenderer

loadRenderer(string type)

Load a renderer

JDocument

parse(array params)

Parses the document and prepares the buffers

The

render(boolean cache, array params)

Outputs the document

Field Detail

libraries/joomla/document/document.php at line 196

_buffer

public static mixed (depends on the renderer) $_buffer = null

Array of buffered output

Since: 11.1 libraries/joomla/document/document.php at line 108

_charset

public string $_charset = 'utf-8'

Contains the character encoding string

Since: 11.1 libraries/joomla/document/document.php at line 180

_engine

public object $_engine = null

The rendering engine

Since: 11.1 libraries/joomla/document/document.php at line 76

_generator

public string $_generator = 'Joomla! - Open Source Content Management' libraries/joomla/document/document.php at line 100

_lineEnd

public string $_lineEnd = "\12"

Contains the line end string

Since: 11.1 libraries/joomla/document/document.php at line 84

_mdate

public string $_mdate = ''

Document modified date

Since: 11.1 libraries/joomla/document/document.php at line 172

_metaTags

public array $_metaTags = array()

Array of meta tags

Since: 11.1 libraries/joomla/document/document.php at line 116

_mime

public string $_mime = ''

Document mime type

Since: 11.1 libraries/joomla/document/document.php at line 124

_namespace

public string $_namespace = ''

Document namespace

Since: 11.1 libraries/joomla/document/document.php at line 132

_profile

public string $_profile = ''

Document profile

Since: 11.1 libraries/joomla/document/document.php at line 148

_script

public array $_script = array()

Array of scripts placed in the header

Since: 11.1 libraries/joomla/document/document.php at line 140

_scripts

public array $_scripts = array()

Array of linked scripts

Since: 11.1 libraries/joomla/document/document.php at line 164

_style

public array $_style = array()

Array of included style declarations

Since: 11.1 libraries/joomla/document/document.php at line 156

_styleSheets

public array $_styleSheets = array()

Array of linked style sheets

Since: 11.1 libraries/joomla/document/document.php at line 92

_tab

public string $_tab = "\11" libraries/joomla/document/document.php at line 188

_type

public string $_type = null

The document type

Since: 11.1 libraries/joomla/document/document.php at line 53

base

public string $base = ''

Document base URL

Since: 11.1 libraries/joomla/document/document.php at line 37

description

public string $description = ''

Document description

Since: 11.1 libraries/joomla/document/document.php at line 69

direction

public string $direction = 'ltr'

Contains the document direction setting

Since: 11.1 libraries/joomla/document/document.php at line 202

instances

protected static array JDocument instances container. $instances = array() libraries/joomla/document/document.php at line 61

language

public string $language = 'en-gb'

Contains the document language setting

Since: 11.1 libraries/joomla/document/document.php at line 45

link

public string $link = ''

Document full URL

Since: 11.1 libraries/joomla/document/document.php at line 29

title

public string $title = ''

Document title

Since: 11.1

Constructor Detail

libraries/joomla/document/document.php at line 211

__construct

public void __construct(array options)

Class constructor.

Parameters: options - Associative array of options Since: 11.1

Method Detail

libraries/joomla/document/document.php at line 261

getInstance

public static object getInstance(string type, array attributes)

Returns the global JDocument object, only creating it if it doesn't already exist.

Parameters: type - The document type to instantiate attributes - Array of attributes Returns: The document object. Since: 11.1 Throws: RuntimeException libraries/joomla/document/document.php at line 316

setType

public JDocument setType(string type)

Set the document type

Parameters: type - Type document is to set to Returns: instance of $this to allow chaining Since: 11.1 libraries/joomla/document/document.php at line 330

getType

public string getType()

Returns the document type

Since: 11.1 libraries/joomla/document/document.php at line 342

getBuffer

public The getBuffer()

Get the contents of the document buffer

Returns: contents of the document buffer Since: 11.1 libraries/joomla/document/document.php at line 357

setBuffer

public JDocument setBuffer(string content, array options)

Set the contents of the document buffer

Parameters: content - The content to be set in the buffer. options - Array of optional elements. Returns: instance of $this to allow chaining Since: 11.1 libraries/joomla/document/document.php at line 374

getMetaData

public string getMetaData(string name, boolean httpEquiv)

Gets a meta tag.

Parameters: name - Value of name or http-equiv tag httpEquiv - META type "http-equiv" defaults to null Since: 11.1 libraries/joomla/document/document.php at line 412

setMetaData

public JDocument setMetaData(string name, string content, boolean http_equiv)

Sets or alters a meta tag.

Parameters: name - Value of name or http-equiv tag content - Value of the content tag http_equiv - META type "http-equiv" defaults to null Returns: instance of $this to allow chaining Since: 11.1 libraries/joomla/document/document.php at line 451

addScript

public JDocument addScript(string url, string type, boolean defer, boolean async)

Adds a linked script to the page

Parameters: url - URL to the linked script type - Type of script. Defaults to 'text/javascript' defer - Adds the defer attribute. async - Adds the async attribute. Returns: instance of $this to allow chaining Since: 11.1 libraries/joomla/document/document.php at line 470

addScriptDeclaration

public JDocument addScriptDeclaration(string content, string type)

Adds a script to the page

Parameters: content - Script type - Scripting mime (defaults to 'text/javascript') Returns: instance of $this to allow chaining Since: 11.1 libraries/joomla/document/document.php at line 496

addStyleSheet

public JDocument addStyleSheet(string url, string type, string media, array attribs)

Adds a linked stylesheet to the page

Parameters: url - URL to the linked style sheet type - Mime encoding type media - Media type that this stylesheet applies to attribs - Array of attributes Returns: instance of $this to allow chaining Since: 11.1 libraries/joomla/document/document.php at line 515

addStyleDeclaration

public JDocument addStyleDeclaration(string content, string type)

Adds a stylesheet declaration to the page

Parameters: content - Style declarations type - Type of stylesheet (defaults to 'text/css') Returns: instance of $this to allow chaining Since: 11.1 libraries/joomla/document/document.php at line 538

setCharset

public JDocument setCharset(string type)

Sets the document charset

Parameters: type - Charset encoding string Returns: instance of $this to allow chaining Since: 11.1 libraries/joomla/document/document.php at line 552

getCharset

public string getCharset()

Returns the document charset encoding.

Since: 11.1 libraries/joomla/document/document.php at line 566

setLanguage

public JDocument setLanguage(string lang)

Sets the global document language declaration. Default is English (en-gb).

Parameters: lang - The language to be set Returns: instance of $this to allow chaining Since: 11.1 libraries/joomla/document/document.php at line 580

getLanguage

public string getLanguage()

Returns the document language.

Since: 11.1 libraries/joomla/document/document.php at line 594

setDirection

public JDocument setDirection(string dir)

Sets the global document direction declaration. Default is left-to-right (ltr).

Parameters: dir - The language direction to be set Returns: instance of $this to allow chaining Since: 11.1 libraries/joomla/document/document.php at line 608

getDirection

public string getDirection()

Returns the document direction declaration.

Since: 11.1 libraries/joomla/document/document.php at line 622

setTitle

public JDocument setTitle(string title)

Sets the title of the document

Parameters: title - The title to be set Returns: instance of $this to allow chaining Since: 11.1 libraries/joomla/document/document.php at line 636

getTitle

public string getTitle()

Return the title of the document.

Since: 11.1 libraries/joomla/document/document.php at line 650

setBase

public JDocument setBase(string base)

Sets the base URI of the document

Parameters: base - The base URI to be set Returns: instance of $this to allow chaining Since: 11.1 libraries/joomla/document/document.php at line 664

getBase

public string getBase()

Return the base URI of the document.

Since: 11.1 libraries/joomla/document/document.php at line 678

setDescription

public JDocument setDescription(string description)

Sets the description of the document

Parameters: description - The description to set Returns: instance of $this to allow chaining Since: 11.1 libraries/joomla/document/document.php at line 692

getDescription

public string getDescription()

Return the title of the page.

Since: 11.1 libraries/joomla/document/document.php at line 706

setLink

public JDocument setLink(string url)

Sets the document link

Parameters: url - A url Returns: instance of $this to allow chaining Since: 11.1 libraries/joomla/document/document.php at line 720

getLink

public string getLink()

Returns the document base url

Since: 11.1 libraries/joomla/document/document.php at line 734

setGenerator

public JDocument setGenerator(string generator)

Sets the document generator

Parameters: generator - The generator to be set Returns: instance of $this to allow chaining Since: 11.1 libraries/joomla/document/document.php at line 748

getGenerator

public string getGenerator()

Returns the document generator

Since: 11.1 libraries/joomla/document/document.php at line 762

setModifiedDate

public JDocument setModifiedDate(string date)

Sets the document modified date

Parameters: date - The date to be set Returns: instance of $this to allow chaining Since: 11.1 libraries/joomla/document/document.php at line 776

getModifiedDate

public string getModifiedDate()

Returns the document modified date

Since: 11.1 libraries/joomla/document/document.php at line 799

setMimeEncoding

public JDocument setMimeEncoding(string type, boolean sync)

Sets the document MIME encoding that is sent to the browser.

This usually will be text/html because most browsers cannot yet accept the proper mime settings for XHTML: application/xhtml+xml and to a lesser extent application/xml and text/xml. See the W3C note (http://www.w3.org/TR/xhtml-media-types/) for more details.

Parameters: type - The document type to be sent sync - Should the type be synced with HTML? Returns: instance of $this to allow chaining Since: 11.1 See Also: http://www.w3.org/TR/xhtml-media-types libraries/joomla/document/document.php at line 819

getMimeEncoding

public string getMimeEncoding()

Return the document MIME encoding that is sent to the browser.

Since: 11.1 libraries/joomla/document/document.php at line 833

setLineEnd

public JDocument setLineEnd(string style)

Sets the line end style to Windows, Mac, Unix or a custom string.

Parameters: style - "win", "mac", "unix" or custom string. Returns: instance of $this to allow chaining Since: 11.1 libraries/joomla/document/document.php at line 860

_getLineEnd

public string _getLineEnd()

Returns the lineEnd

Since: 11.1 libraries/joomla/document/document.php at line 874

setTab

public JDocument setTab(string string)

Sets the string used to indent HTML

Parameters: string - String used to indent ("\11", "\t", ' ', etc.). Returns: instance of $this to allow chaining Since: 11.1 libraries/joomla/document/document.php at line 888

_getTab

public string _getTab()

Returns a string containing the unit for indenting HTML

Since: 11.1 libraries/joomla/document/document.php at line 903

loadRenderer

public JDocumentRenderer loadRenderer(string type)

Load a renderer

Parameters: type - The renderer type Returns: Object or null if class does not exist Since: 11.1 Throws: RuntimeException libraries/joomla/document/document.php at line 940

parse

public JDocument parse(array params)

Parses the document and prepares the buffers

Parameters: params - The array of parameters Returns: instance of $this to allow chaining Since: 11.1 libraries/joomla/document/document.php at line 955

render

public The render(boolean cache, array params)

Outputs the document

Parameters: cache - If true, cache the output params - Associative array of attributes Returns: rendered data Since: 11.1 Вернуться к записям по теме Joomla.

ya.samposebe.ru

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

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

Joomla.Platform\JDocumentHTML

libraries/joomla/document/html/html.php at line 21 JDocument└─JDocumentHTML

public class JDocumentHTMLextends JDocument

Subpackage: Document Since: 11.1 Field Summary
protected integer

$_caching

Integer with caching setting

array

$_custom

Array of custom tags

array

$_file

File name

private boolean

$_html5

Set to true when the document should be output as HTML%

array

$_links

Array of Header tags

protected string

$_template

String holding parsed template

protected array

$_template_tags

Array of parsed template JDoc tags

string

$baseurl

Base url

array

$params

Array of template parameters

string

$template

Name of the template

Fields inherited from Joomla.Platform\JDocument
_buffer, _charset, _engine, _generator, _lineEnd, _mdate, _metaTags, _mime, _namespace, _profile, _script, _scripts, _style, _styleSheets, _tab, _type, base, description, direction, instances, language, link, title
Constructor Summary
void

__construct(array options)

Class constructor

Method Summary
array

getHeadData()

Get the HTML document head data

JDocumentHTML

setHeadData(array data)

Set the HTML document head data

JDocumentHTML

mergeHeadData(array data)

Merge the HTML document head data

JDocumentHTML

addHeadLink(string href, string relation, string relType, array attribs)

Adds tags to the head of the document$relType defaults to 'rel' as it is the most common relation type used.

JDocumentHTML

addFavicon(string href, string type, string relation)

Adds a shortcut icon (favicon)This adds a link to the icon shown in the favorites list or on the left of the url in the address bar.

JDocumentHTML

addCustomTag(string html)

Adds a custom HTML string to the head block

Boolean

isHtml5()

Returns whether the document is set up to be output as HTML5

void

setHtml5(bool state)

Sets whether the document should be output as HTML5

The

getBuffer(string type, string name, array attribs)

Get the contents of a document include

JDocumentHTML

setBuffer(string content, array options)

Set the contents a document includes

JDocumentHTML

parse(array params)

Parses the template and populates the buffer

The

render(boolean caching, array params, boolean cache)

Outputs the template to the browser.

integer

countModules(string condition)

Count the modules based on the given condition

integer

countMenuChildren()

Count the number of child menu items

protected static string

_loadTemplate(string directory, string filename)

Load a template file

protected JDocumentHTML

_fetchTemplate(array params)

Fetch the template, and initialise the params

protected JDocumentHTML

_parseTemplate()

Parse a document template

protected string

_renderTemplate()

Render pre-parsed template

Methods inherited from Joomla.Platform\JDocument
__construct, _getLineEnd, _getTab, addScript, addScriptDeclaration, addStyleDeclaration, addStyleSheet, getBase, getBuffer, getCharset, getDescription, getDirection, getGenerator, getInstance, getLanguage, getLink, getMetaData, getMimeEncoding, getModifiedDate, getTitle, getType, loadRenderer, parse, render, setBase, setBuffer, setCharset, setDescription, setDirection, setGenerator, setLanguage, setLineEnd, setLink, setMetaData, setMimeEncoding, setModifiedDate, setTab, setTitle, setType

Field Detail

libraries/joomla/document/html/html.php at line 93

_caching

protected integer $_caching = null

Integer with caching setting

Since: 11.1 libraries/joomla/document/html/html.php at line 37

_custom

public array $_custom = array()

Array of custom tags

Since: 11.1 libraries/joomla/document/html/html.php at line 69

_file

public array $_file = null libraries/joomla/document/html/html.php at line 101

_html5

private boolean $_html5 = null

Set to true when the document should be output as HTML%

Since: 12.1 libraries/joomla/document/html/html.php at line 29

_links

public array $_links = array()

Array of Header tags

Since: 11.1 libraries/joomla/document/html/html.php at line 77

_template

protected string $_template = ''

String holding parsed template

Since: 11.1 libraries/joomla/document/html/html.php at line 85

_template_tags

protected array $_template_tags = array()

Array of parsed template JDoc tags

Since: 11.1 libraries/joomla/document/html/html.php at line 53

baseurl

public string $baseurl = null libraries/joomla/document/html/html.php at line 61

params

public array $params = null

Array of template parameters

Since: 11.1 libraries/joomla/document/html/html.php at line 45

template

public string $template = null

Name of the template

Since: 11.1

Constructor Detail

libraries/joomla/document/html/html.php at line 110

__construct

public void __construct(array options)

Class constructor

Parameters: options - Associative array of options Since: 11.1

Method Detail

libraries/joomla/document/html/html.php at line 128

getHeadData

public array getHeadData()

Get the HTML document head data

Returns: The document head data in array form Since: 11.1 libraries/joomla/document/html/html.php at line 153

setHeadData

public JDocumentHTML setHeadData(array data)

Set the HTML document head data

Parameters: data - The document head data in array form Returns: instance of $this to allow chaining Since: 11.1 libraries/joomla/document/html/html.php at line 183

mergeHeadData

public JDocumentHTML mergeHeadData(array data)

Merge the HTML document head data

Parameters: data - The document head data in array form Returns: instance of $this to allow chaining Since: 11.1 libraries/joomla/document/html/html.php at line 267

addHeadLink

public JDocumentHTML addHeadLink(string href, string relation, string relType, array attribs)

Adds tags to the head of the document

$relType defaults to 'rel' as it is the most common relation type used. ('rev' refers to reverse relation, 'rel' indicates normal, forward relation.) Typical tag:

Parameters: href - The link that is being related. relation - Relation of link. relType - Relation type attribute. Either rel or rev (default: 'rel'). attribs - Associative array of remaining attributes. Returns: instance of $this to allow chaining Since: 11.1 libraries/joomla/document/html/html.php at line 291

addFavicon

public JDocumentHTML addFavicon(string href, string type, string relation)

Adds a shortcut icon (favicon)

This adds a link to the icon shown in the favorites list or on the left of the url in the address bar. Some browsers display it on the tab, as well.

Parameters: href - The link that is being related. type - File type relation - Relation of link Returns: instance of $this to allow chaining Since: 11.1 libraries/joomla/document/html/html.php at line 308

addCustomTag

public JDocumentHTML addCustomTag(string html)

Adds a custom HTML string to the head block

Parameters: html - The HTML to add to the head Returns: instance of $this to allow chaining Since: 11.1 libraries/joomla/document/html/html.php at line 322

isHtml5

public Boolean isHtml5()

Returns whether the document is set up to be output as HTML5

Returns: true when HTML5 is used Since: 12.1 libraries/joomla/document/html/html.php at line 336

setHtml5

public void setHtml5(bool state)

Sets whether the document should be output as HTML5

Parameters: state - True when HTML5 should be output Since: 12.1 libraries/joomla/document/html/html.php at line 355

getBuffer

public The getBuffer(string type, string name, array attribs)

Get the contents of a document include

Parameters: type - The type of renderer name - The name of the element to render attribs - Associative array of remaining attributes. Returns: output of the renderer Since: 11.1 libraries/joomla/document/html/html.php at line 415

setBuffer

public JDocumentHTML setBuffer(string content, array options)

Set the contents a document includes

Parameters: content - The content to be set in the buffer. options - Array of optional elements. Returns: instance of $this to allow chaining Since: 11.1 libraries/joomla/document/html/html.php at line 441

parse

public JDocumentHTML parse(array params)

Parses the template and populates the buffer

Parameters: params - Parameters for fetching the template Returns: instance of $this to allow chaining Since: 11.1 libraries/joomla/document/html/html.php at line 456

render

public The render(boolean caching, array params, boolean cache)

Outputs the template to the browser.

Parameters: caching - If true, cache the output params - Associative array of attributes Returns: rendered data Since: 11.1 libraries/joomla/document/html/html.php at line 483

countModules

public integer countModules(string condition)

Count the modules based on the given condition

Parameters: condition - The condition to use Returns: Number of modules found Since: 11.1 libraries/joomla/document/html/html.php at line 508 public integer countMenuChildren()

Count the number of child menu items

Returns: Number of child menu items Since: 11.1 libraries/joomla/document/html/html.php at line 546

_loadTemplate

protected static string _loadTemplate(string directory, string filename)

Load a template file

Parameters: directory - The name of the template filename - The actual filename Returns: The contents of the template Since: 11.1 libraries/joomla/document/html/html.php at line 592

_fetchTemplate

protected JDocumentHTML _fetchTemplate(array params)

Fetch the template, and initialise the params

Parameters: params - Parameters to determine the template Returns: instance of $this to allow chaining Since: 11.1 libraries/joomla/document/html/html.php at line 632

_parseTemplate

protected JDocumentHTML _parseTemplate()

Parse a document template

Returns: instance of $this to allow chaining Since: 11.1 libraries/joomla/document/html/html.php at line 674

_renderTemplate

protected string _renderTemplate()

Render pre-parsed template

Returns: rendered template Since: 11.1 Вернуться к записям по теме Joomla.

ya.samposebe.ru

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

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

Joomla.Platform\JForm

libraries/joomla/form/form.php at line 28 JForm

public class JForm

Subpackage: Form See Also: http://www.w3.org/TR/html4/interact/forms.html http://www.w3.org/TR/html5/forms.html Since: 11.1 Field Summary
protected object

$data

The JRegistry data store for form fields during display.

protected array

$errors

The form object errors array.

protected static array

$forms

Form instances.

protected string

$name

The name of the form instance.

protected array

$options

The form object options for use in rendering and validation.

protected SimpleXMLElement

$xml

The form XML definition.

Constructor Summary
void

__construct(string name, array options)

Method to instantiate the form object.

Method Summary
boolean

bind(mixed data)

Method to bind data to the form.

protected void

bindLevel(string group, mixed data)

Method to bind data to the form for the group level.

mixed

filter(array data, string group)

Method to filter the form data.

array

getErrors()

Return all errors, if any.

mixed

getField(string name, string group, mixed value)

Method to get a form field represented as a JFormField object.

mixed

getFieldAttribute(string name, string attribute, mixed default, string group)

Method to get an attribute value from a field XML element.

array

getFieldset(string set)

Method to get an array of JFormField objects in a given fieldset by name.

array

getFieldsets(string group)

Method to get an array of fieldset objects optionally filtered over a given field group.

string

getFormControl()

Method to get the form control.

array

getGroup(string group, boolean nested)

Method to get an array of JFormField objects in a given field group by name.

string

getInput(string name, string group, mixed value)

Method to get a form field markup for the field input.

string

getLabel(string name, string group)

Method to get the label for a field input.

string

getName()

Method to get the form name.

mixed

getValue(string name, string group, mixed default)

Method to get the value of a field.

boolean

load(string data, string replace, string xpath)

Method to load the form description from an XML string or object.

boolean

loadFile(string file, string reset, string xpath)

Method to load the form description from an XML file.

boolean

removeField(string name, string group)

Method to remove a field from the form definition.

boolean

removeGroup(string group)

Method to remove a group from the form definition.

boolean

reset(boolean xml)

Method to reset the form data store and optionally the form XML definition.

boolean

setField(SimpleXMLElement element, string group, boolean replace)

Method to set a field XML element to the form definition.

boolean

setFieldAttribute(string name, string attribute, mixed value, string group)

Method to set an attribute value for a field XML element.

boolean

setFields(array &$elements, string group, boolean replace, mixed elements)

Method to set some field XML elements to the form definition.

boolean

setValue(string name, string group, mixed value)

Method to set the value of a field.

mixed

validate(array data, string group)

Method to validate form data.

protected mixed

filterField(string element, mixed value)

Method to apply an input filter to a value based on field data.

protected mixed

findField(string name, string group)

Method to get a form field represented as an XML element object.

protected mixed

findFieldsByFieldset(string name)

Method to get an array of elements from the form XML document which are in a specified fieldset by name.

protected mixed

findFieldsByGroup(mixed group, boolean nested)

Method to get an array of elements from the form XML document which are in a control group by name.

protected mixed

findGroup(string group)

Method to get a form field group represented as an XML element object.

protected mixed

loadField(string element, string group, mixed value)

Method to load, setup and return a JFormField object based on field data.

protected mixed

loadFieldType(string type, boolean new)

Proxy for JFormHelper::loadFieldType().

protected mixed

loadRuleType(string type, boolean new)

Proxy for JFormHelper::loadRuleType().

protected boolean

syncPaths()

Method to synchronize any field, form or rule paths contained in the XML document.

protected mixed

validateField(SimpleXMLElement element, string group, mixed value, JRegistry input)

Method to validate a JFormField object based on field data.

static array

addFieldPath(mixed new)

Proxy for JFormHelper::addFieldPath().

static array

addFormPath(mixed new)

Proxy for JFormHelper::addFormPath().

static array

addRulePath(mixed new)

Proxy for JFormHelper::addRulePath().

static object

getInstance(string name, string data, array options, string replace, string xpath)

Method to get an instance of a form.

protected static void

addNode(SimpleXMLElement source, SimpleXMLElement new)

Adds a new child SimpleXMLElement node to the source.

protected static void

mergeNode(SimpleXMLElement source, SimpleXMLElement new)

Update the attributes of a child node

protected static void

mergeNodes(SimpleXMLElement source, SimpleXMLElement new)

Merges new elements into a source element.

Field Detail

libraries/joomla/form/form.php at line 35

data

protected object $data = null

The JRegistry data store for form fields during display.

Since: 11.1 libraries/joomla/form/form.php at line 42

errors

protected array $errors = array()

The form object errors array.

Since: 11.1 libraries/joomla/form/form.php at line 70

forms

protected static array $forms = array()

Form instances.

Since: 11.1 libraries/joomla/form/form.php at line 49

name

protected string $name

The name of the form instance.

Since: 11.1 libraries/joomla/form/form.php at line 56

options

protected array $options = array()

The form object options for use in rendering and validation.

Since: 11.1 libraries/joomla/form/form.php at line 63

xml

protected SimpleXMLElement $xml

The form XML definition.

Since: 11.1

Constructor Detail

libraries/joomla/form/form.php at line 80

__construct

public void __construct(string name, array options)

Method to instantiate the form object.

Parameters: name - The name of the form. options - An array of form options. Since: 11.1

Method Detail

libraries/joomla/form/form.php at line 101

bind

public boolean bind(mixed data)

Method to bind data to the form.

Parameters: data - An array or object of data to bind to the form. Returns: True on success. Since: 11.1 libraries/joomla/form/form.php at line 164

bindLevel

protected void bindLevel(string group, mixed data)

Method to bind data to the form for the group level.

Parameters: group - The dot-separated form group path on which to bind the data. data - An array or object of data to bind to the form for the group level. Since: 11.1 libraries/joomla/form/form.php at line 196

filter

public mixed filter(array data, string group)

Method to filter the form data.

Parameters: data - An array of field values to filter. group - The dot-separated form group path on which to filter the fields. Returns: Array or false. Since: 11.1 libraries/joomla/form/form.php at line 254

getErrors

public array getErrors()

Return all errors, if any.

Returns: Array of error messages or RuntimeException objects. Since: 11.1 libraries/joomla/form/form.php at line 270

getField

public mixed getField(string name, string group, mixed value)

Method to get a form field represented as a JFormField object.

Parameters: name - The name of the form field. group - The optional dot-separated form group path on which to find the field. value - The optional value to use as the default for the field. Returns: The JFormField object for the field or boolean false on error. Since: 11.1 libraries/joomla/form/form.php at line 304

getFieldAttribute

public mixed getFieldAttribute(string name, string attribute, mixed default, string group)

Method to get an attribute value from a field XML element. If the attribute doesn't exist or is null then the optional default value will be used.

Parameters: name - The name of the form field for which to get the attribute value. attribute - The name of the attribute for which to get a value. default - The optional default value to use if no attribute value exists. group - The optional dot-separated form group path on which to find the field. Returns: The attribute value for the field. Since: 11.1 Throws: UnexpectedValueException libraries/joomla/form/form.php at line 337

getFieldset

public array getFieldset(string set)

Method to get an array of JFormField objects in a given fieldset by name. If no name is given then all fields are returned.

Parameters: set - The optional name of the fieldset. Returns: The array of JFormField objects in the fieldset. Since: 11.1 libraries/joomla/form/form.php at line 385

getFieldsets

public array getFieldsets(string group)

Method to get an array of fieldset objects optionally filtered over a given field group.

Parameters: group - The dot-separated form group path on which to filter the fieldsets. Returns: The array of fieldset objects. Since: 11.1 libraries/joomla/form/form.php at line 491

getFormControl

public string getFormControl() libraries/joomla/form/form.php at line 507

getGroup

public array getGroup(string group, boolean nested)

Method to get an array of JFormField objects in a given field group by name.

Parameters: group - The dot-separated form group path for which to get the form fields. nested - True to also include fields in nested groups that are inside of the group for which to find fields. Returns: The array of JFormField objects in the field group. Since: 11.1 libraries/joomla/form/form.php at line 549

getInput

public string getInput(string name, string group, mixed value)

Method to get a form field markup for the field input.

Parameters: name - The name of the form field. group - The optional dot-separated form group path on which to find the field. value - The optional value to use as the default for the field. Returns: The form field markup. Since: 11.1 libraries/joomla/form/form.php at line 570

getLabel

public string getLabel(string name, string group)

Method to get the label for a field input.

Parameters: name - The name of the form field. group - The optional dot-separated form group path on which to find the field. Returns: The form field label. Since: 11.1 libraries/joomla/form/form.php at line 588

getName

public string getName()

Method to get the form name.

Returns: The name of the form. Since: 11.1 libraries/joomla/form/form.php at line 604

getValue

public mixed getValue(string name, string group, mixed default)

Method to get the value of a field.

Parameters: name - The name of the field for which to get the value. group - The optional dot-separated form group path on which to get the value. default - The optional default value of the field value is empty. Returns: The value of the field or the default value if empty. Since: 11.1 libraries/joomla/form/form.php at line 637

load

public boolean load(string data, string replace, string xpath)

Method to load the form description from an XML string or object.

The replace option works per field. If a field being loaded already exists in the current form definition then the behavior or load will vary depending upon the replace flag. If it is set to true, then the existing field will be replaced in its exact location by the new field being loaded. If it is false, then the new field being loaded will be ignored and the method will move on to the next field to load.

Parameters: data - The name of an XML string or object. replace - Flag to toggle whether form fields should be replaced if a field already exists with the same group/name. xpath - An optional xpath to search for the fields. Returns: True on success, false otherwise. Since: 11.1 libraries/joomla/form/form.php at line 759

loadFile

public boolean loadFile(string file, string reset, string xpath)

Method to load the form description from an XML file.

The reset option works on a group basis. If the XML file references groups that have already been created they will be replaced with the fields in the new XML file unless the $reset parameter has been set to false.

Parameters: file - The filesystem path of an XML file. reset - Flag to toggle whether form fields should be replaced if a field already exists with the same group/name. xpath - An optional xpath to search for the fields. Returns: True on success, false otherwise. Since: 11.1 libraries/joomla/form/form.php at line 791

removeField

public boolean removeField(string name, string group)

Method to remove a field from the form definition.

Parameters: name - The name of the form field for which remove. group - The optional dot-separated form group path on which to find the field. Returns: True on success. Since: 11.1 Throws: UnexpectedValueException libraries/joomla/form/form.php at line 822

removeGroup

public boolean removeGroup(string group)

Method to remove a group from the form definition.

Parameters: group - The dot-separated form group path for the group to remove. Returns: True on success. Since: 11.1 Throws: UnexpectedValueException libraries/joomla/form/form.php at line 850

reset

public boolean reset(boolean xml)

Method to reset the form data store and optionally the form XML definition.

Parameters: xml - True to also reset the XML form definition. Returns: True on success. Since: 11.1 libraries/joomla/form/form.php at line 878

setField

public boolean setField(SimpleXMLElement element, string group, boolean replace)

Method to set a field XML element to the form definition. If the replace flag is set then the field will be set whether it already exists or not. If it isn't set, then the field will not be replaced if it already exists.

Parameters: element - The XML element object representation of the form field. group - The optional dot-separated form group path on which to set the field. replace - True to replace an existing field if one already exists. Returns: True on success. Since: 11.1 Throws: UnexpectedValueException libraries/joomla/form/form.php at line 940

setFieldAttribute

public boolean setFieldAttribute(string name, string attribute, mixed value, string group)

Method to set an attribute value for a field XML element.

Parameters: name - The name of the form field for which to set the attribute value. attribute - The name of the attribute for which to set a value. value - The value to set for the attribute. group - The optional dot-separated form group path on which to find the field. Returns: True on success. Since: 11.1 Throws: UnexpectedValueException libraries/joomla/form/form.php at line 982

setFields

public boolean setFields(array &$elements, string group, boolean replace, mixed elements)

Method to set some field XML elements to the form definition. If the replace flag is set then the fields will be set whether they already exists or not. If it isn't set, then the fields will not be replaced if they already exist.

Parameters: &$elements - The array of XML element object representations of the form fields. group - The optional dot-separated form group path on which to set the fields. replace - True to replace existing fields if they already exist. Returns: True on success. Since: 11.1 Throws: UnexpectedValueException libraries/joomla/form/form.php at line 1027

setValue

public boolean setValue(string name, string group, mixed value)

Method to set the value of a field. If the field does not exist in the form then the method will return false.

Parameters: name - The name of the field for which to set the value. group - The optional dot-separated form group path on which to find the field. value - The value to set for the field. Returns: True on success. Since: 11.1 libraries/joomla/form/form.php at line 1062

validate

public mixed validate(array data, string group)

Method to validate form data.

Validation warnings will be pushed into JForm::errors and should be retrieved with JForm::getErrors() when validate returns boolean false.

Parameters: data - An array of field values to validate. group - The optional dot-separated form group path on which to filter the fields to be validated. Returns: True on sucess. Since: 11.1 libraries/joomla/form/form.php at line 1128

filterField

protected mixed filterField(string element, mixed value)

Method to apply an input filter to a value based on field data.

Parameters: element - The XML element object representation of the form field. value - The value to filter for the field. Returns: The filtered value. Since: 11.1 libraries/joomla/form/form.php at line 1376

findField

protected mixed findField(string name, string group)

Method to get a form field represented as an XML element object.

Parameters: name - The name of the form field. group - The optional dot-separated form group path on which to find the field. Returns: The XML element object for the field or boolean false on error. Since: 11.1 libraries/joomla/form/form.php at line 1467

findFieldsByFieldset

protected mixed findFieldsByFieldset(string name)

Method to get an array of elements from the form XML document which are in a specified fieldset by name.

Parameters: name - The name of the fieldset. Returns: Boolean false on error or array of SimpleXMLElement objects. Since: 11.1 libraries/joomla/form/form.php at line 1500

findFieldsByGroup

protected mixed findFieldsByGroup(mixed group, boolean nested)

Method to get an array of elements from the form XML document which are in a control group by name.

Parameters: group - The optional dot-separated form group path on which to find the fields. Null will return all fields. False will return fields not in a group. nested - True to also include fields in nested groups that are inside of the group for which to find fields. Returns: Boolean false on error or array of SimpleXMLElement objects. Since: 11.1 libraries/joomla/form/form.php at line 1574

findGroup

protected mixed findGroup(string group)

Method to get a form field group represented as an XML element object.

Parameters: group - The dot-separated form group path on which to find the group. Returns: An array of XML element objects for the group or boolean false on error. Since: 11.1 libraries/joomla/form/form.php at line 1658

loadField

protected mixed loadField(string element, string group, mixed value)

Method to load, setup and return a JFormField object based on field data.

Parameters: element - The XML element object representation of the form field. group - The optional dot-separated form group path on which to find the field. value - The optional value to use as the default for the field. Returns: The JFormField object for the field or boolean false on error. Since: 11.1 libraries/joomla/form/form.php at line 1727

loadFieldType

protected mixed loadFieldType(string type, boolean new)

Proxy for JFormHelper::loadFieldType().

Parameters: type - The field type. new - Flag to toggle whether we should get a new instance of the object. Returns: JFormField object on success, false otherwise. Since: 11.1 libraries/joomla/form/form.php at line 1743

loadRuleType

protected mixed loadRuleType(string type, boolean new)

Proxy for JFormHelper::loadRuleType().

Parameters: type - The rule type. new - Flag to toggle whether we should get a new instance of the object. Returns: JFormRule object on success, false otherwise. See Also: JFormHelper::loadRuleType() Since: 11.1 libraries/joomla/form/form.php at line 1756

syncPaths

protected boolean syncPaths()

Method to synchronize any field, form or rule paths contained in the XML document.

Returns: True on success. Since: 11.1 Todo: Maybe we should receive all addXXXpaths attributes at once? libraries/joomla/form/form.php at line 1815

validateField

protected mixed validateField(SimpleXMLElement element, string group, mixed value, JRegistry input)

Method to validate a JFormField object based on field data.

Parameters: element - The XML element object representation of the form field. group - The optional dot-separated form group path on which to find the field. value - The optional value to use as the default for the field. input - An optional JRegistry object with the entire data set to validate against the entire form. Returns: Boolean true if field value is valid, Exception on failure. Since: 11.1 Throws: InvalidArgumentException UnexpectedValueException libraries/joomla/form/form.php at line 1894

addFieldPath

public static array addFieldPath(mixed new)

Proxy for JFormHelper::addFieldPath().

Parameters: new - A path or array of paths to add. Returns: The list of paths that have been added. Since: 11.1 libraries/joomla/form/form.php at line 1909

addFormPath

public static array addFormPath(mixed new)

Proxy for JFormHelper::addFormPath().

Parameters: new - A path or array of paths to add. Returns: The list of paths that have been added. See Also: JFormHelper::addFormPath() Since: 11.1 libraries/joomla/form/form.php at line 1924

addRulePath

public static array addRulePath(mixed new)

Proxy for JFormHelper::addRulePath().

Parameters: new - A path or array of paths to add. Returns: The list of paths that have been added. See Also: JFormHelper::addRulePath() Since: 11.1 libraries/joomla/form/form.php at line 1945

getInstance

public static object getInstance(string name, string data, array options, string replace, string xpath)

Method to get an instance of a form.

Parameters: name - The name of the form. data - The name of an XML file or string to load as the form definition. options - An array of form options. replace - Flag to toggle whether form fields should be replaced if a field already exists with the same group/name. xpath - An optional xpath to search for the fields. Returns: JForm instance. Since: 11.1 Throws: InvalidArgumentException - if no data provided. RuntimeException - if the form could not be loaded. libraries/joomla/form/form.php at line 1993

addNode

protected static void addNode(SimpleXMLElement source, SimpleXMLElement new)

Adds a new child SimpleXMLElement node to the source.

Parameters: source - The source element on which to append. new - The new element to append. Since: 11.1 libraries/joomla/form/form.php at line 2021

mergeNode

protected static void mergeNode(SimpleXMLElement source, SimpleXMLElement new)

Update the attributes of a child node

Parameters: source - The source element on which to append the attributes new - The new element to append Since: 11.1 libraries/joomla/form/form.php at line 2047

mergeNodes

protected static void mergeNodes(SimpleXMLElement source, SimpleXMLElement new)

Merges new elements into a source element.

Parameters: source - The source element. new - The new element to merge. Since: 11.1 Вернуться к записям по теме Joomla.

ya.samposebe.ru

JModelForm (Документация по Joomla 2.5.4)

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

Joomla.Platform\JModelForm

libraries/joomla/application/component/modelform.php at line 24 JObject└─JModel└─JModelForm All Known Subclasses: Joomla.Administrator\BannersModelDownload Joomla.Administrator\ConfigModelApplication Joomla.Administrator\ConfigModelComponent Joomla.Site\ContactModelContact JModelAdmin Joomla.Administrator\MenusModelMenu Joomla.Administrator\MessagesModelConfig Joomla.Administrator\TemplatesModelSource Joomla.Site\UsersModelLogin Joomla.Site\UsersModelProfile Joomla.Site\UsersModelRegistration Joomla.Site\UsersModelRemind Joomla.Site\UsersModelReset

public abstract class JModelFormextends JModel

Subpackage: Application See Also: JForm JFormField JformRule Since: 11.1 Field Summary
protected array

$_forms

Array of form objects.

protected array

$forms

Array of form objects.

Fields inherited from Joomla.Platform\JObject
_errors
Method Summary
boolean

checkin(integer pk)

Method to checkin a row.

boolean

checkout(integer pk)

Method to check-out a row for editing.

abstract mixed

getForm(array data, boolean loadData)

Abstract method for getting the form from the model.

protected mixed

loadForm(string name, string source, array options, boolean clear, string xpath)

Method to get a form object.

protected array

loadFormData()

Method to get the data that should be injected in the form.

protected void

preprocessForm(JForm form, mixed data, string group)

Method to allow derived classes to preprocess the form.

mixed

validate(object form, array data, string group)

Method to validate the form data.

Methods inherited from Joomla.Platform\JModel
__construct, _createFileName, _createTable, _getList, _getListCount, addIncludePath, addTablePath, cleanCache, getDbo, getInstance, getName, getState, getTable, populateState, setDbo, setState
Methods inherited from Joomla.Platform\JObject
__construct, __toString, def, get, getError, getErrors, getProperties, set, setError, setProperties, toString

Field Detail

libraries/joomla/application/component/modelform.php at line 41

_forms

protected array $_forms = array()

Array of form objects.

Since: 11.1 Deprecated: use $forms declare as private libraries/joomla/application/component/modelform.php at line 32

forms

protected array $forms = array()

Array of form objects.

Since: 11.1

Method Detail

libraries/joomla/application/component/modelform.php at line 52

checkin

public boolean checkin(integer pk)

Method to checkin a row.

Parameters: pk - The numeric id of the primary key. Returns: False on failure or error, true otherwise. Since: 11.1 libraries/joomla/application/component/modelform.php at line 94

checkout

public boolean checkout(integer pk)

Method to check-out a row for editing.

Parameters: pk - The numeric id of the primary key. Returns: False on failure or error, true otherwise. Since: 11.1 libraries/joomla/application/component/modelform.php at line 137

getForm

public abstract mixed getForm(array data, boolean loadData)

Abstract method for getting the form from the model.

Parameters: data - Data for the form. loadData - True if the form is to load its own data (default case), false if not. Returns: A JForm object on success, false on failure Since: 11.1 libraries/joomla/application/component/modelform.php at line 153

loadForm

protected mixed loadForm(string name, string source, array options, boolean clear, string xpath)

Method to get a form object.

Parameters: name - The name of the form. source - The form source. Can be XML string if file flag is set to false. options - Optional array of options for the form creation. clear - Optional argument to force load a new form. xpath - An optional xpath to search for the fields. Returns: JForm object on success, False on error. See Also: JForm Since: 11.1 libraries/joomla/application/component/modelform.php at line 212

loadFormData

protected array loadFormData()

Method to get the data that should be injected in the form.

Returns: The default data is an empty array. Since: 11.1 libraries/joomla/application/component/modelform.php at line 230

preprocessForm

protected void preprocessForm(JForm form, mixed data, string group)

Method to allow derived classes to preprocess the form.

Parameters: form - A JForm object. data - The data expected for the form. group - The name of the plugin group to import (defaults to "content"). See Also: JFormField Since: 11.1 Throws: Exception - if there is an error in the form event. libraries/joomla/application/component/modelform.php at line 267

validate

public mixed validate(object form, array data, string group)

Method to validate the form data.

Parameters: form - The form to validate against. data - The data to validate. group - The name of the field group to validate. Returns: Array of filtered data if valid, false otherwise. See Also: JFormRule JFilterInput Since: 11.1 Вернуться к записям по теме Joomla.

ya.samposebe.ru

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

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

Joomla.Platform\JFactory

libraries/joomla/factory.php at line 17 JFactory

public abstract class JFactory

Since: 11.1 Method Summary
static JApplication

getApplication(mixed id, array config, string prefix)

Get a application object.

static JRegistry

getConfig(string file, string type, string namespace)

Get a configuration objectReturns the global JRegistry object, only creating it if it doesn't already exist.

static JSession

getSession(array options)

Get a session object.

static JLanguage

getLanguage()

Get a language object.

static JDocument

getDocument()

Get a document object.

static JUser

getUser(integer id)

Get an user object.

static JCacheController

getCache(string group, string handler, string storage)

Get a cache objectReturns the global JCache object

static JAccess

getACL()

Get an authorization objectReturns the global JAccess object, only creating it if it doesn't already exist.

static JDatabaseDriver

getDbo()

Get a database object.

static JMail

getMailer()

Get a mailer object.

static mixed

getFeedParser(string url, integer cache_time)

Get a parsed XML Feed Source

static mixed

getXML(string data, boolean isFile)

Reads a XML file.

static JEditor

getEditor(string editor)

Get an editor object.

static JURI

getURI(string uri)

Return a reference to the JURI object

static JDate

getDate(mixed time, mixed tzOffset)

Return the JDate object

protected static JRegistry

createConfig(string file, string type, string namespace)

Create a configuration object

protected static JSession

createSession(array options)

Create a session object

protected static JDatabaseDriver

createDbo()

Create an database object

protected static JMail

createMailer()

Create a mailer object

protected static JLanguage

createLanguage()

Create a language object

protected static JDocument

createDocument()

Create a document object

static JStream

getStream(boolean use_prefix, boolean use_network, string ua, boolean uamask)

Creates a new stream object with appropriate prefix

Field Detail

libraries/joomla/factory.php at line 66

acl

public static JAccess $acl = null Since: 11.1 Deprecated: 13.3 libraries/joomla/factory.php at line 23

application

public static JApplication $application = null libraries/joomla/factory.php at line 29

cache

public static JCache $cache = null libraries/joomla/factory.php at line 35

config

public static JConfig $config = null libraries/joomla/factory.php at line 72

database

public static JDatabaseDriver $database = null libraries/joomla/factory.php at line 41

dates

public static array $dates = array() libraries/joomla/factory.php at line 59

document

public static JDocument $document = null libraries/joomla/factory.php at line 53

language

public static JLanguage $language = null libraries/joomla/factory.php at line 78

mailer

public static JMail $mailer = null libraries/joomla/factory.php at line 47

session

public static JSession $session = null

Method Detail

libraries/joomla/factory.php at line 95

getApplication

public static JApplication getApplication(mixed id, array config, string prefix)

Get a application object.

Returns the global JApplication object, only creating it if it doesn't already exist.

Parameters: id - A client identifier or name. config - An optional associative array of configuration settings. prefix - Application prefix Returns: object See Also: JApplication Since: 11.1 Throws: Exception libraries/joomla/factory.php at line 124

getConfig

public static JRegistry getConfig(string file, string type, string namespace)

Get a configuration object

Returns the global JRegistry object, only creating it if it doesn't already exist.

Parameters: file - The path to the configuration file type - The type of the configuration file namespace - The namespace of the configuration file See Also: JRegistry Since: 11.1 libraries/joomla/factory.php at line 151

getSession

public static JSession getSession(array options)

Get a session object.

Returns the global JSession object, only creating it if it doesn't already exist.

Parameters: options - An array containing session options Returns: object See Also: JSession Since: 11.1 libraries/joomla/factory.php at line 171

getLanguage

public static JLanguage getLanguage()

Get a language object.

Returns the global JLanguage object, only creating it if it doesn't already exist.

Returns: object See Also: JLanguage Since: 11.1 libraries/joomla/factory.php at line 191

getDocument

public static JDocument getDocument()

Get a document object.

Returns the global JDocument object, only creating it if it doesn't already exist.

Returns: object See Also: JDocument Since: 11.1 libraries/joomla/factory.php at line 213

getUser

public static JUser getUser(integer id)

Get an user object.

Returns the global JUser object, only creating it if it doesn't already exist.

Parameters: id - The user to load - Can be an integer or string - If string, it is converted to ID automatically. Returns: object See Also: JUser Since: 11.1 libraries/joomla/factory.php at line 245

getCache

public static JCacheController getCache(string group, string handler, string storage)

Get a cache object

Returns the global JCache object

Parameters: group - The cache group name handler - The handler to use storage - The storage method Returns: object See Also: JCache libraries/joomla/factory.php at line 278

getACL

public static JAccess getACL()

Get an authorization object

Returns the global JAccess object, only creating it if it doesn't already exist.

Returns: object Deprecated: 13.3 Use JAccess directly. libraries/joomla/factory.php at line 300

getDbo

public static JDatabaseDriver getDbo() libraries/joomla/factory.php at line 325

getMailer

public static JMail getMailer()

Get a mailer object.

Returns the global JMail object, only creating it if it doesn't already exist.

Returns: object See Also: JMail Since: 11.1 libraries/joomla/factory.php at line 347

getFeedParser

public static mixed getFeedParser(string url, integer cache_time)

Get a parsed XML Feed Source

Parameters: url - Url for feed source. cache_time - Time to cache feed for (using internal cache mechanism). Returns: SimplePie parsed object on success, false on failure. Since: 11.1 Deprecated: 13.3 Use JSimplepieFactory::getFeedParser() instead. libraries/joomla/factory.php at line 372

getXML

public static mixed getXML(string data, boolean isFile)

Reads a XML file.

Parameters: data - Full path and file name. isFile - true to load a file or false to load a string. Returns: JXMLElement or SimpleXMLElement on success or false on error. See Also: JXMLElement Since: 11.1 Note: When JXMLElement is not present a SimpleXMLElement will be returned. Deprecated: 13.3 Use SimpleXML directly. libraries/joomla/factory.php at line 424

getEditor

public static JEditor getEditor(string editor)

Get an editor object.

Parameters: editor - The editor to load, depends on the editor plugins that are installed Returns: instance of JEditor Since: 11.1 Deprecated: 12.3 Use JEditor directly libraries/joomla/factory.php at line 456

getURI

public static JURI getURI(string uri)

Return a reference to the JURI object

Parameters: uri - Uri name. Returns: object See Also: JURI Since: 11.1 Deprecated: 13.3 Use JURI directly. libraries/joomla/factory.php at line 474

getDate

public static JDate getDate(mixed time, mixed tzOffset)

Return the JDate object

Parameters: time - The initial time for the JDate object tzOffset - The timezone offset. Returns: object See Also: JDate Since: 11.1 libraries/joomla/factory.php at line 528

createConfig

protected static JRegistry createConfig(string file, string type, string namespace)

Create a configuration object

Parameters: file - The path to the configuration file. type - The type of the configuration file. namespace - The namespace of the configuration file. See Also: JRegistry Since: 11.1 libraries/joomla/factory.php at line 566

createSession

protected static JSession createSession(array options)

Create a session object

Parameters: options - An array containing session options Returns: object Since: 11.1 libraries/joomla/factory.php at line 592

createDbo

protected static JDatabaseDriver createDbo() libraries/joomla/factory.php at line 632

createMailer

protected static JMail createMailer()

Create a mailer object

Returns: object See Also: JMail Since: 11.1 libraries/joomla/factory.php at line 679

createLanguage

protected static JLanguage createLanguage()

Create a language object

Returns: object See Also: JLanguage Since: 11.1 libraries/joomla/factory.php at line 697

createDocument

protected static JDocument createDocument()

Create a document object

Returns: object See Also: JDocument Since: 11.1 libraries/joomla/factory.php at line 723

getStream

public static JStream getStream(boolean use_prefix, boolean use_network, string ua, boolean uamask)

Creates a new stream object with appropriate prefix

Parameters: use_prefix - Prefix the connections for writing use_network - Use network if available for writing; use false to disable (e.g. FTP, SCP) ua - UA User agent to use uamask - User agent masking (prefix Mozilla) See Also: JStream Since: 11.1 Вернуться к записям по теме Joomla.

ya.samposebe.ru

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

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

Joomla.Site\JSite

includes/application.php at line 20 JApplicationBase└─JApplication└─JSite

public final class JSiteextends JApplication

Subpackage: Application Since: 1.5 Constructor Summary
void

__construct(array config, array An)

Class constructor

Method Summary
void

initialise(array options)

Initialise the application.

void

route()

Route the application.

void

dispatch(string component)

Dispatch the application

void

render()

Display the application.

boolean

login(array Array('username, array Array('remember, array credentials, array options)

Login authentication function

void

authorise(mixed itemid)

Check if the user can access the application

object

getParams(string The, mixed option)

Get the appliaction parameters

static object

getPageParameters(string The, mixed option)

Get the application parameters

string

getTemplate(bool params)

Get the template

void

setTemplate(mixed The, mixed template, mixed styleParams)

Overrides the default template that would be used

object

getMenu(string name, array options)

Return a reference to the JPathway object.

object

getPathway(string name, array options)

Return a reference to the JPathway object.

static JRouter

getRouter(string name, array options)

Return a reference to the JRouter object.

boolean

getLanguageFilter()

Return the current state of the language filter.

boolean

setLanguageFilter(bool state)

Set the current state of the language filter.

boolean

getDetectBrowser()

Return the current state of the detect browser option.

boolean

setDetectBrowser(bool state)

Set the current state of the detect browser option.

none;

redirect(string The, string An, boolean True, string url, str msg, str msgType, bool moved, bool persistMsg)

Redirect to another URL.

Methods inherited from Joomla.Legacy\JApplication
__construct, __toString, _createConfiguration, _createSession, afterSessionStart, checkSession, dispatch, enqueueMessage, getCfg, getClientId, getHash, getInstance, getMenu, getMessageQueue, getName, getPathway, getRouter, getTemplate, getUserState, getUserStateFromRequest, initialise, isAdmin, isSSLConnection, isSite, isWinOS, login, logout, redirect, render, route, setUserState, stringURLSafe

Field Detail

includes/application.php at line 36

_detect_browser

private mixed $_detect_browser = false

Option to detect language by the browser

includes/application.php at line 31

_language_filter

private mixed $_language_filter = false

Option to filter by language

includes/application.php at line 26

template

private object $template = null

Currently active template

Constructor Detail

includes/application.php at line 44

__construct

public void __construct(array config, array An)

Class constructor

Parameters: An - optional associative array of configuration settings. Recognized key values include 'clientId' (this list is not meant to be comprehensive). Since: 11.1

Method Detail

includes/application.php at line 55

initialise

public void initialise(array options)

Initialise the application.

Since: 11.1 includes/application.php at line 141

route

public void route()

Route the application.

Since: 11.1 includes/application.php at line 154

dispatch

public void dispatch(string component)

Dispatch the application

Since: 11.1 includes/application.php at line 223

render

public void render()

Display the application.

Since: 11.1 includes/application.php at line 293

login

public boolean login(array Array('username, array Array('remember, array credentials, array options)

Login authentication function

Parameters: Array('username' - => string, 'password' => string) Array('remember' - => boolean) See Also: JApplication::login Returns: True on success. Since: 11.1 includes/application.php at line 310

authorise

public void authorise(mixed itemid)

Check if the user can access the application

includes/application.php at line 343

getParams

public object getParams(string The, mixed option)

Get the appliaction parameters

Parameters: The - component option Returns: The parameters object Since: 1.5 includes/application.php at line 407

getPageParameters

public static object getPageParameters(string The, mixed option)

Get the application parameters

Parameters: The - component option Returns: The parameters object Since: 1.5 includes/application.php at line 418

getTemplate

public string getTemplate(bool params)

Get the template

Returns: The template name Since: 1.0 Parameters: params - An optional associative array of configuration settings includes/application.php at line 513

setTemplate

public void setTemplate(mixed The, mixed template, mixed styleParams)

Overrides the default template that would be used

Parameters: The - template name The - template style parameters includes/application.php at line 536 public object getMenu(string name, array options)

Return a reference to the JPathway object.

Parameters: name - The name of the application/client. options - An optional associative array of configuration settings. Returns: JMenu. Since: 1.5 includes/application.php at line 552

getPathway

public object getPathway(string name, array options)

Return a reference to the JPathway object.

Parameters: name - The name of the application. options - An optional associative array of configuration settings. Returns: JPathway. Since: 1.5 includes/application.php at line 568

getRouter

public static JRouter getRouter(string name, array options)

Return a reference to the JRouter object.

Parameters: name - The name of the application. options - An optional associative array of configuration settings. Since: 1.5 includes/application.php at line 582

getLanguageFilter

public boolean getLanguageFilter()

Return the current state of the language filter.

Since: 1.6 includes/application.php at line 593

setLanguageFilter

public boolean setLanguageFilter(bool state)

Set the current state of the language filter.

Returns: The old state Since: 1.6 includes/application.php at line 605

getDetectBrowser

public boolean getDetectBrowser()

Return the current state of the detect browser option.

Since: 1.6 includes/application.php at line 616

setDetectBrowser

public boolean setDetectBrowser(bool state)

Set the current state of the detect browser option.

Returns: The old state Since: 1.6 includes/application.php at line 641

redirect

public none; redirect(string The, string An, boolean True, string url, str msg, str msgType, bool moved, bool persistMsg)

Redirect to another URL.

Optionally enqueues a message in the system message queue (which will be displayed the next time a page is loaded) using the enqueueMessage method. If the headers have not been sent the redirect will be accomplished using a "301 Moved Permanently" code in the header pointing to the new location. If the headers have already been sent this will be accomplished using a JavaScript statement.

Parameters: The - URL to redirect to. Can only be http/https URL An - optional message to display on redirect. An - optional message type. True - if the page is 301 Permanently Moved, otherwise 303 See Other is assumed. True - if the enqueued messages are passed to the redirection, false else. Returns: calls exit(). Since: 1.5 See Also: JApplication::enqueueMessage() Вернуться к записям по теме Joomla.

ya.samposebe.ru

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

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

Joomla.Site\ContentModelCategory

components/com_content/models/category.php at line 20 JObject└─JModelLegacy└─JModelList└─ContentModelCategory

public class ContentModelCategoryextends JModelList

Subpackage: com_content Since: 1.5 Fields inherited from Joomla.Platform\JObject
_errors
Constructor Summary
void

__construct(array config, array An, mixed properties)

Constructor.

Method Summary
protected void

populateState(string ordering, string direction)

Method to auto-populate the model state.

mixed

getItems()

Get the articles in the category

protected string

_buildContentOrderBy()

Build the orderby for the query

JPagination

getPagination()

Method to get a JPagination object for the data set.

object

getCategory(int An)

Method to get category data for the current category

mixed

getParent(int An)

Get the parent categorie.

mixed

getLeftSibling()

Get the left sibling (adjacent) categories.

mixed

getRightSibling()

Get the right sibling (adjacent) categories.

mixed

getChildren(int An)

Get the child categories.

boolean

hit(int pk)

Increment the hit counter for the category.

Methods inherited from Joomla.Legacy\JModelLegacy
__construct, _createFileName, _createTable, _getList, _getListCount, addIncludePath, addTablePath, cleanCache, getDbo, getInstance, getName, getState, getTable, populateState, setDbo, setState

Field Detail

components/com_content/models/category.php at line 29

_articles

protected mixed $_articles = null components/com_content/models/category.php at line 58

_categories

protected array $_categories = null

The list of other newfeed categories.

components/com_content/models/category.php at line 50

_category

protected object $_category = null

The category that applies.

components/com_content/models/category.php at line 33

_children

protected mixed $_children = null components/com_content/models/category.php at line 42

_context

protected string $_context = 'com_content.category' components/com_content/models/category.php at line 27

_item

protected array $_item = null components/com_content/models/category.php at line 35

_parent

protected mixed $_parent = null components/com_content/models/category.php at line 31

_siblings

protected mixed $_siblings = null

Constructor Detail

components/com_content/models/category.php at line 67

__construct

public void __construct(array config, array An, mixed properties)

Constructor.

Parameters: An - optional associative array of configuration settings. See Also: JController Since: 1.6 Throws: Exception

Method Detail

components/com_content/models/category.php at line 103

populateState

protected void populateState(string ordering, string direction)

Method to auto-populate the model state.

Note. Calling getState in this method will result in recursion.

return void

Since: 1.6 Note: Calling getState in this method will result in recursion. Parameters: ordering - An optional ordering field. direction - An optional direction (asc|desc). components/com_content/models/category.php at line 202

getItems

public mixed getItems()

Get the articles in the category

Returns: An array of articles or false if an error occurs. Since: 1.5 components/com_content/models/category.php at line 247

_buildContentOrderBy

protected string _buildContentOrderBy()

Build the orderby for the query

Returns: $orderby portion of query Since: 1.5 components/com_content/models/category.php at line 280 public JPagination getPagination()

Method to get a JPagination object for the data set.

Returns: A JPagination object for the data set. Since: 12.2 components/com_content/models/category.php at line 296

getCategory

public object getCategory(int An)

Method to get category data for the current category

Parameters: An - optional ID Since: 1.5 components/com_content/models/category.php at line 350

getParent

public mixed getParent(int An)

Get the parent categorie.

Parameters: An - optional category id. If not supplied, the model state 'category.id' will be used. Returns: An array of categories or false if an error occurs. Since: 1.6 components/com_content/models/category.php at line 365

getLeftSibling

public mixed getLeftSibling()

Get the left sibling (adjacent) categories.

Returns: An array of categories or false if an error occurs. Since: 1.6 components/com_content/models/category.php at line 380

getRightSibling

public mixed getRightSibling()

Get the right sibling (adjacent) categories.

Returns: An array of categories or false if an error occurs. Since: 1.6 components/com_content/models/category.php at line 397

getChildren

public mixed getChildren(int An)

Get the child categories.

Parameters: An - optional category id. If not supplied, the model state 'category.id' will be used. Returns: An array of categories or false if an error occurs. Since: 1.6 components/com_content/models/category.php at line 422

hit

public boolean hit(int pk)

Increment the hit counter for the category.

Parameters: pk - Optional primary key of the category to increment. Returns: True if successful; false otherwise and internal error set. Вернуться к записям по теме Joomla.

ya.samposebe.ru


Смотрите также

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