|
| onContentBeforeSave ($context, $table, $isNew, $data) |
|
| onContentAfterSave ($context, $article, $isNew) |
|
| onContentBeforeDelete ($context, $data) |
|
| onContentBeforeChangeState ($context, $pks, $value) |
|
| onContentChangeState ($context, $pks, $value) |
|
| __construct (&$subject, $config=array()) |
|
| loadLanguage ($extension='', $basePath=JPATH_ADMINISTRATOR) |
|
| setApplication (CMSApplicationInterface $application) |
|
| setDispatcher (DispatcherInterface $dispatcher) |
|
| registerListeners () |
|
Example Content Plugin
- Depuis
- 1.6
◆ _canDeleteCategories()
_canDeleteCategories |
( |
|
$data | ) |
|
|
private |
◆ _canDeleteStage()
◆ _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, et $query.
◆ _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, et $query.
◆ _countItemsInStage()
_countItemsInStage |
( |
array |
$stageIds, |
|
|
string |
$extension |
|
) |
| |
|
private |
◆ checkMenuItemBeforeSave()
checkMenuItemBeforeSave |
( |
|
$context, |
|
|
|
$table, |
|
|
|
$isNew, |
|
|
|
$data |
|
) |
| |
|
private |
The save event.
- Paramètres
-
string | $context | The context |
object | $table | The item |
boolean | $isNew | Is new item |
array | $data | The validated data |
- Renvoie
- boolean
- Depuis
- 3.9.12
Références $context, et $params.
◆ 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
- void
- Depuis
- 1.6
Références $article, $context, $db, $lang, $message, $query, $user, User\getInstance(), et ComponentHelper\getParams().
◆ onContentBeforeChangeState()
onContentBeforeChangeState |
( |
|
$context, |
|
|
|
$pks, |
|
|
|
$value |
|
) |
| |
Don't allow workflows/stages to be deleted if they contain items
- Paramètres
-
string | $context | The context for the content passed to the plugin. |
object | $pks | The IDs of the records which will be changed. |
object | $value | The new state. |
- Renvoie
- boolean
- Depuis
- 4.0.0
Références $context, $id, $result, et $value.
◆ 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, et $data.
◆ onContentBeforeSave()
onContentBeforeSave |
( |
|
$context, |
|
|
|
$table, |
|
|
|
$isNew, |
|
|
|
$data |
|
) |
| |
The save event.
- Paramètres
-
string | $context | The context |
object | $table | The item |
boolean | $isNew | Is new item |
array | $data | The validated data |
- Renvoie
- boolean
- Depuis
- 4.0.0
Références $context, $data, et $item.
◆ onContentChangeState()
onContentChangeState |
( |
|
$context, |
|
|
|
$pks, |
|
|
|
$value |
|
) |
| |
Change the state in core_content if the stage 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 stage. |
integer | $value | The value of the condition that the content has been changed to |
- Renvoie
- boolean
- Depuis
- 3.1
Références $context, $db, $query, $value, et ArrayHelper\toInteger().
◆ $app
◆ $db
La documentation de cette classe a été générée à partir du fichier suivant :