Class plgContentJoomla

Description

Example Content Plugin

  • since: 1.6

Located in /plugins/content/joomla/joomla.php (line 16)

JObject
   |
   --JEvent
      |
      --JPlugin
         |
         --plgContentJoomla
Method Summary
void onContentAfterSave (string $context, object A &$article, bool $isNew)
boolean onContentBeforeDelete (string $context, object The $data)
mixed _countItemsInCategory (string $table, int $catid)
mixed _countItemsInChildren (string $table, int $catid,  $data)
Variables

Inherited Variables

Inherited from JPlugin

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

Inherited from JEvent

JEvent::$_subject

Inherited from JObject

JObject::$_errors
Methods
onContentAfterSave (line 28)

Example after save content method Article is passed by reference, but after the save, so no changes will be saved.

Method is called right after the content is saved

  • since: 1.6
  • access: public
void onContentAfterSave (string $context, object A &$article, bool $isNew)
  • string $context: The context of the content passed to the plugin (added in 1.6)
  • object A &$article: JTableContent object
  • bool $isNew: If the content is just about to be created
onContentBeforeDelete (line 86)

Don't allow categories to be deleted if they contain items or subcategories with items

  • since: 1.6
  • access: public
boolean onContentBeforeDelete (string $context, object The $data)
  • string $context: The context for the content passed to the plugin.
  • object The $data: data relating to the content that was deleted.
_countItemsInCategory (line 161)

Get count of items in a category

  • return: count of items found or false if db error
  • since: 1.6
  • access: private
mixed _countItemsInCategory (string $table, int $catid)
  • string $table: table name of component table (column is catid)
  • int $catid: id of the category to check
_countItemsInChildren (line 191)

Get count of items in a category's child categories

  • return: count of items found or false if db error
  • since: 1.6
  • access: private
mixed _countItemsInChildren (string $table, int $catid,  $data)
  • string $table: table name of component table (column is catid)
  • int $catid: id of the category to check
  • $data

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()
JObject::__toString()

Documentation generated on Mon, 25 Jun 2012 13:56:00 -0500 by phpDocumentor 1.4.4