[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/plugins/content/joomla/ -> joomla.php (summary)

(no description)

Copyright: (C) 2010 Open Source Matters, Inc.
License: GNU General Public License version 2 or later; see LICENSE.txt
File Size: 614 lines (19 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

PlgContentJoomla:: (12 methods):
  onContentBeforeSave()
  onContentAfterSave()
  onContentBeforeDelete()
  onContentBeforeChangeState()
  _canDeleteCategories()
  _canDeleteWorkflow()
  _canDeleteStage()
  _countItemsInCategory()
  _countItemsInStage()
  _countItemsInChildren()
  onContentChangeState()
  checkMenuItemBeforeSave()


Class: PlgContentJoomla  - X-Ref

Example Content Plugin

onContentBeforeSave($context, $table, $isNew, $data)   X-Ref
The save event.

param: string   $context  The context
param: object   $table    The item
param: boolean  $isNew    Is new item
param: array    $data     The validated data
return: boolean

onContentAfterSave($context, $article, $isNew)   X-Ref
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

param: string   $context  The context of the content passed to the plugin (added in 1.6)
param: object   $article  A JTableContent object
param: boolean  $isNew    If the content is just about to be created
return: void

onContentBeforeDelete($context, $data)   X-Ref
Don't allow categories to be deleted if they contain items or subcategories with items

param: string  $context  The context for the content passed to the plugin.
param: object  $data     The data relating to the content that was deleted.
return: boolean

onContentBeforeChangeState($context, $pks, $value)   X-Ref
Don't allow workflows/stages to be deleted if they contain items

param: string  $context  The context for the content passed to the plugin.
param: object  $pks      The IDs of the records which will be changed.
param: object  $value    The new state.
return: boolean

_canDeleteCategories($data)   X-Ref
Checks if a given category can be deleted

param: object  $data  The category object
return: boolean

_canDeleteWorkflow($pk)   X-Ref
Checks if a given workflow can be deleted

param: int  $pk  The stage ID
return: boolean

_canDeleteStage($pk)   X-Ref
Checks if a given stage can be deleted

param: int  $pk  The stage ID
return: boolean

_countItemsInCategory($table, $catid)   X-Ref
Get count of items in a category

param: string   $table  table name of component table (column is catid)
param: integer  $catid  id of the category to check
return: mixed  count of items found or false if db error

_countItemsInStage(array $stageIds, string $extension)   X-Ref
Get count of items in assigned to a stage

param: array   $stageIds   The stage ids to test for
param: string  $extension  The extension of the workflow
return: bool

_countItemsInChildren($table, $catid, $data)   X-Ref
Get count of items in a category's child categories

param: string   $table  table name of component table (column is catid)
param: integer  $catid  id of the category to check
param: object   $data   The data relating to the content that was deleted.
return: mixed  count of items found or false if db error

onContentChangeState($context, $pks, $value)   X-Ref
Change the state in core_content if the stage in a table is changed

param: string   $context  The context for the content passed to the plugin.
param: array    $pks      A list of primary key ids of the content that has changed stage.
param: integer  $value    The value of the condition that the content has been changed to
return: boolean

checkMenuItemBeforeSave($context, $table, $isNew, $data)   X-Ref
The save event.

param: string   $context  The context
param: object   $table    The item
param: boolean  $isNew    Is new item
param: array    $data     The validated data
return: boolean



Generated: Wed Sep 7 05:41:13 2022 Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer