Class PlgContentJoomla

Description

Example Content Plugin

  • since: 1.6

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

JObject
   |
   --JEvent
      |
      --JPlugin
         |
         --PlgContentJoomla
Method Summary
 boolean onContentAfterSave (string $context, object $article, boolean $isNew)
 boolean onContentBeforeDelete (string $context, object $data)
 boolean onContentChangeState (string $context, array $pks, integer $value)
Variables
Methods
onContentAfterSave (line 35)

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

  • return: true if function not enabled, is in front-end or is new. Else true or false depending on success of save function.
  • since: 1.6
  • access: public
boolean onContentAfterSave (string $context, object $article, boolean $isNew)
  • string $context: The context of the content passed to the plugin (added in 1.6)
  • object $article: A JTableContent object
  • boolean $isNew: If the content is just about to be created
onContentBeforeDelete (line 103)

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 $data)
  • string $context: The context for the content passed to the plugin.
  • object $data: The data relating to the content that was deleted.
onContentChangeState (line 281)

Change the state in core_content if the state in a table is changed

  • since: 3.1
  • access: public
boolean onContentChangeState (string $context, array $pks, integer $value)
  • string $context: The context for the content passed to the plugin.
  • array $pks: A list of primary key ids of the content that has changed state.
  • integer $value: The value of the state that the content has been changed to.

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:06:07 +0100 by phpDocumentor 1.4.3