Example Content Plugin
- Depuis
- 1.6
◆ _countItemsInCategory()
_countItemsInCategory |
( |
|
$table, |
|
|
|
$catid |
|
) |
| |
|
private |
Get count of items in a category
- Paramètres
-
string | $table | table name of component table (column is catid) |
integer | $catid | id of the category to check |
- Renvoie
- mixed count of items found or false if db error
- Depuis
- 1.6
Références $count, $db, $query, et JError\raiseWarning().
◆ _countItemsInChildren()
_countItemsInChildren |
( |
|
$table, |
|
|
|
$catid, |
|
|
|
$data |
|
) |
| |
|
private |
Get count of items in a category's child categories
- Paramètres
-
string | $table | table name of component table (column is catid) |
integer | $catid | id of the category to check |
object | $data | The data relating to the content that was deleted. |
- Renvoie
- mixed count of items found or false if db error
- Depuis
- 1.6
Références $count, $data, $db, $query, et JError\raiseWarning().
◆ onContentAfterSave()
onContentAfterSave |
( |
|
$context, |
|
|
|
$article, |
|
|
|
$isNew |
|
) |
| |
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ètres
-
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 |
- Renvoie
- boolean true if function not enabled, is in frontend or is new. Else true or false depending on success of save function.
- Depuis
- 1.6
Références $article, $context, $db, $lang, $message, $query, $user, $users, et JPATH_ADMINISTRATOR.
◆ onContentBeforeDelete()
onContentBeforeDelete |
( |
|
$context, |
|
|
|
$data |
|
) |
| |
Don't allow categories to be deleted if they contain items or subcategories with items
- Paramètres
-
string | $context | The context for the content passed to the plugin. |
object | $data | The data relating to the content that was deleted. |
- Renvoie
- boolean
- Depuis
- 1.6
Références $context, $count, $data, $extension, elseif, et JError\raiseWarning().
◆ onContentBeforeSave()
onContentBeforeSave |
( |
|
$context, |
|
|
|
$table, |
|
|
|
$isNew |
|
) |
| |
The save event.
- Paramètres
-
string | $context | The context |
object | $table | The item |
boolean | $isNew | Is new item |
- Renvoie
- void
- Depuis
- 3.9.12
Références $context, et $params.
◆ onContentChangeState()
onContentChangeState |
( |
|
$context, |
|
|
|
$pks, |
|
|
|
$value |
|
) |
| |
Change the state in core_content if the state in a table is changed
- Paramètres
-
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. |
- Renvoie
- boolean
- Depuis
- 3.1
Références $context, $db, $query, et $value.
La documentation de cette classe a été générée à partir du fichier suivant :