Class PlgContentPagebreak

Description

Page break plugin

Usage:

  1. <hr class="system-pagebreak" />
  1. <hr class="system-pagebreak" title="The page title" />
or
  1. <hr class="system-pagebreak" alt="The first page" />
or
  1. <hr class="system-pagebreak" title="The page title" alt="The first page" />
or
  1. <hr class="system-pagebreak" alt="The first page" title="The page title" />

  • since: 1.6

Located in /plugins/content/pagebreak/pagebreak.php (line 31)

JObject
   |
   --JEvent
      |
      --JPlugin
         |
         --PlgContentPagebreak
Variable Summary
Method Summary
 mixed onContentPrepare (string $context, object &$row, mixed &$params, [integer $page = 0])
 void _createNavigation (object &$row, int $page, int $n)
 void _createTOC (object &$row, array &$matches, integer &$page)
Variables
boolean $autoloadLanguage = true (line 39)

Load the language file on instantiation.

  • since: 3.1
  • access: protected

Redefinition of:
JPlugin::$autoloadLanguage
Affects constructor behavior. If true, language files will be loaded automatically.

Inherited Variables

Inherited from JPlugin

JPlugin::$params
JPlugin::$_name
JPlugin::$_type

Inherited from JEvent

JEvent::$_subject

Inherited from JObject

JObject::$_errors
Methods
onContentPrepare (line 53)

Plugin that adds a pagebreak into the text and truncates text at that point

  • return: Always returns void or true
  • since: 1.6
  • access: public
mixed onContentPrepare (string $context, object &$row, mixed &$params, [integer $page = 0])
  • string $context: The context of the content being passed to the plugin.
  • object &$row: The article object. Note $article->text is also available
  • mixed &$params: The article params
  • integer $page: The 'page' number
_createNavigation (line 358)

Creates the navigation for the item

  • since: 1.6
  • access: protected
void _createNavigation (object &$row, int $page, int $n)
  • object &$row: The article object. Note $article->text is also available
  • int $page: The total number of pages
  • int $n: The page number
_createTOC (line 254)

Creates a Table of Contents for the pagebreak

  • since: 1.6
  • access: protected
void _createTOC (object &$row, array &$matches, integer &$page)
  • object &$row: The article object. Note $article->text is also available
  • array &$matches: Array of matches of a regex in onContentPrepare
  • integer &$page: The 'page' number

Inherited Methods

Inherited From JPlugin

 JPlugin::__construct()
 JPlugin::loadLanguage()

Inherited From JEvent

 JEvent::__construct()
 JEvent::update()

Inherited From JObject

 JObject::__construct()
 JObject::def()
 JObject::get()
 JObject::getError()
 JObject::getErrors()
 JObject::getProperties()
 JObject::set()
 JObject::setError()
 JObject::setProperties()
 JObject::__toString()

Documentation generated on Tue, 19 Nov 2013 15:10:04 +0100 by phpDocumentor 1.4.3