Joomla CMS  4.2.2
Documentation des API du CMS Joomla en version 4.2.2
Tout Structures de données Espaces de nommage Fichiers Fonctions Variables Pages
Référence de la classe Workflow

Fonctions membres publiques

 __construct (string $extension, ?CMSApplication $app=null, ?DatabaseDriver $db=null)
 
 getConditionName (int $value)
 
 getDefaultStageByCategory ($catId=0)
 
 getValidTransition (array $pks, int $transitionId)
 
 executeTransition (array $pks, int $transitionId)
 
 createAssociation (int $pk, int $state)
 
 updateAssociations (array $pks, int $state)
 
 deleteAssociation (array $pks)
 
 getAssociation (int $itemId)
 

Champs de données

const CONDITION_NAMES
 
const CONDITION_PUBLISHED = 1
 
const CONDITION_UNPUBLISHED = 0
 
const CONDITION_TRASHED = -2
 
const CONDITION_ARCHIVED = 2
 

Fonctions membres protégées

 getComponent ()
 

Attributs protégés

 $component = null
 
 $extension = null
 
 $app
 
 $db
 

Description détaillée

Workflow Class.

Depuis
4.0.0

Documentation des constructeurs et destructeur

◆ __construct()

__construct ( string  $extension,
?CMSApplication  $app = null,
?DatabaseDriver  $db = null 
)

Class constructor

Paramètres
string$extensionThe extension name
?CMSApplication$app Application Object
?DatabaseDriver$db Database Driver Object
Depuis
4.0.0

Références $app, $db, $extension, extension, Factory\getApplication(), et Factory\getDbo().

Documentation des fonctions membres

◆ createAssociation()

createAssociation ( int  $pk,
int  $state 
)

Creates an association for the workflow_associations table

Paramètres
integer$pkID of the item
integer$stateID of state
Renvoie
boolean
Depuis
4.0.0

Références $query, $state, extension, et ParameterType\INTEGER.

◆ deleteAssociation()

deleteAssociation ( array  $pks)

Removes associations from the workflow_associations table

Paramètres
integer[]$pks ID of content
Renvoie
boolean
Depuis
4.0.0

Références $query, extension, et ArrayHelper\toInteger().

◆ executeTransition()

executeTransition ( array  $pks,
int  $transitionId 
)

Executes a transition to change the current state in the association table

Paramètres
integer[]$pks The item IDs, which should use the transition
integer$transitionIdThe transition which should be executed
Renvoie
boolean

Références $assoc, $this, AbstractEvent\create(), extension, PluginHelper\importPlugin(), et ArrayHelper\toInteger().

◆ getAssociation()

getAssociation ( int  $itemId)

Loads an existing association item with state and item ID

Paramètres
integer$itemIdThe item ID to load
Renvoie
|null
Depuis
4.0.0

Références $itemId, $query, extension, et ParameterType\INTEGER.

◆ getComponent()

getComponent ( )
protected

Returns the booted component

Renvoie
ComponentInterface
Depuis
4.0.0

Références $component, $parts, et extension.

◆ getConditionName()

getConditionName ( int  $value)

Returns the translated condition name, based on the given number

Paramètres
integer$valueThe condition ID
Renvoie
string
Depuis
4.0.0

Références $component, $value, extension, et ArrayHelper\getValue().

◆ getDefaultStageByCategory()

getDefaultStageByCategory (   $catId = 0)

Try to load a workflow default stage by category ID.

Paramètres
integer$catIdThe category ID.
Renvoie
boolean|integer An integer, holding the stage ID or false
Depuis
4.0.0

Références $category, $query, elseif, extension, et ParameterType\INTEGER.

◆ getValidTransition()

getValidTransition ( array  $pks,
int  $transitionId 
)

Check if a transition can be executed

Paramètres
integer[]$pks The item IDs, which should use the transition
integer$transitionIdThe transition which should be executed
Renvoie
object | null

Références $option, $parts, $query, $user, extension, ParameterType\INTEGER, null, et ArrayHelper\toInteger().

◆ updateAssociations()

updateAssociations ( array  $pks,
int  $state 
)

Update an existing association with a new state

Paramètres
array$pksAn Array of item IDs which should be changed
integer$stateThe new state ID
Renvoie
boolean
Depuis
4.0.0

Références $query, $state, extension, ParameterType\INTEGER, et ArrayHelper\toInteger().

Documentation des champs

◆ $app

$app
protected

◆ $component

$component = null
protected

◆ $db

$db
protected

◆ $extension

$extension = null
protected

◆ CONDITION_ARCHIVED

const CONDITION_ARCHIVED = 2

Every item with a state which has the condition ARCHIVED is archived

◆ CONDITION_NAMES

const CONDITION_NAMES
Valeur initiale :
= [
self::CONDITION_PUBLISHED => 'JPUBLISHED'

Condition to names mapping

Depuis
4.0.0

Référencé par Joomla\CMS\Workflow\getConditions().

◆ CONDITION_PUBLISHED

const CONDITION_PUBLISHED = 1

Every item with a state which has the condition PUBLISHED is visible/active on the page

Référencé par Icon\edit(), et ArticleModel\prepareTable().

◆ CONDITION_TRASHED

const CONDITION_TRASHED = -2

Every item with a state which has the condition TRASHED is trashed

◆ CONDITION_UNPUBLISHED

const CONDITION_UNPUBLISHED = 0

Every item with a state which has the condition UNPUBLISHED is not visible/inactive on the page

Référencé par Icon\edit().


La documentation de cette classe a été générée à partir du fichier suivant :