Joomla CMS  3.9.25 (avec JPlatform 13.1 inclus)
Documentation des API du CMS Joomla en version 3.9.25 et du framework Joomla Platform intégré
Référence de la classe FieldsHelper

Fonctions membres publiques statiques

static extract ($contextString, $item=null)
 
static getFields ($context, $item=null, $prepareValue=false, array $valuesToOverride=null)
 
static render ($context, $layoutFile, $displayData)
 
static canEditFieldValue ($field)
 
static displayFieldOnForm ($field)
 
static getAssignedCategoriesTitles ($fieldId)
 
static getFieldsPluginId ()
 
static addSubmenu ($context, $vName)
 
static getFieldTypes ()
 
static clearFieldsCache ()
 

Attributs privés statiques

static $fieldsCache = null
 
static $fieldCache = null
 

Description détaillée

FieldsHelper

Depuis
3.7.0

Documentation des fonctions membres

◆ addSubmenu()

static addSubmenu (   $context,
  $vName 
)
static

Configure the Linkbar.

Paramètres
string$contextThe context the fields are used for
string$vNameThe view currently active
Renvoie
void
Depuis
3.7.0

Références $component, $context, $file, $lang, $parts, et JPATH_ADMINISTRATOR.

Référencé par FieldsViewFields\display(), et FieldsViewGroups\display().

◆ canEditFieldValue()

static canEditFieldValue (   $field)
static

Return a boolean if the actual logged in user can edit the given field value.

Paramètres
stdClass$fieldThe field
Renvoie
boolean
Depuis
3.7.0

Références $field, et $parts.

Référencé par PlgFieldsRepeatable\onCustomFieldsPrepareDom(), FieldsPlugin\onCustomFieldsPrepareDom(), et FieldsModelField\setFieldValue().

◆ clearFieldsCache()

static clearFieldsCache ( )
static

Clears the internal cache for the custom fields.

Renvoie
void
Depuis
3.8.0

Références null.

Référencé par FieldsModelField\save(), et FieldsModelField\setFieldValue().

◆ displayFieldOnForm()

static displayFieldOnForm (   $field)
static

Return a boolean based on field (and field group) display / show_on settings

Paramètres
stdClass$fieldThe field
Renvoie
boolean
Depuis
3.8.7

Références $app, $field, et elseif.

Référencé par FieldsPlugin\onCustomFieldsPrepareDom().

◆ extract()

◆ getAssignedCategoriesTitles()

static getAssignedCategoriesTitles (   $fieldId)
static

Gets assigned categories titles for a field

Paramètres
stdClass[]$fieldId The field ID
Renvoie
array Array with the assigned categories
Depuis
3.7.0

Références $db, et $query.

◆ getFields()

static getFields (   $context,
  $item = null,
  $prepareValue = false,
array  $valuesToOverride = null 
)
static

Returns the fields for the given context. If the item is an object the returned fields do have an additional field "value" which represents the value for the given item. If the item has an assigned_cat_ids field, then additionally fields which belong to that category will be returned. Should the value being prepared to be shown in an HTML context then prepareValue must be set to true. No further escaping needs to be done. The values of the fields can be overridden by an associative array where the keys have to be a name and its corresponding value.

Paramètres
string$contextThe context of the content passed to the helper
stdClass$itemitem
int | bool$prepareValue(if int is display event): 1 - AfterTitle, 2 - BeforeDisplay, 3 - AfterDisplay, 0 - OFF
array$valuesToOverrideThe values to override
Renvoie
array
Depuis
3.7.0

Références $context, $dispatcher, $field, $fields, $fieldValues, $item, $key, $value, elseif, JEventDispatcher\getInstance(), JPATH_ADMINISTRATOR, et null.

Référencé par ContactControllerContact\_sendEmail(), ContentModelArticle\batchMove(), ContentModelArticle\cleanupPostBatchCopy(), PrivacyPlugin\createCustomFieldsDomain(), PlgSystemFields\display(), PlgSystemFields\onContentAfterSave(), PlgSystemFields\onContentPrepare(), PlgButtonFields\onDisplay(), PlgSystemFields\onPrepareFinderContent(), et PlgContentFields\prepare().

◆ getFieldsPluginId()

static getFieldsPluginId ( )
static

Gets the fields system plugin extension id.

Renvoie
integer The fields system plugin extension id.
Depuis
3.7.0

Références $db, $query, et JError\raiseWarning().

Référencé par FieldsViewFields\display(), et FieldsViewGroups\display().

◆ getFieldTypes()

static getFieldTypes ( )
static

Loads the fields plugins and returns an array of field types from the plugins.

The returned array contains arrays with the following keys:

  • label: The label of the field
  • type: The type of the field
  • path: The path of the folder where the field can be found
Renvoie
array
Depuis
3.7.0

Références $data, $fields, JEventDispatcher\getInstance(), et null.

Référencé par FieldsModelField\checkDefaultValue(), et JFormFieldType\getOptions().

◆ render()

static render (   $context,
  $layoutFile,
  $displayData 
)
static

Renders the layout file and data on the context and does a fall back to Fields afterwards.

Paramètres
string$contextThe context of the content passed to the helper
string$layoutFilelayoutFile
array$displayDatadisplayData
Renvoie
NULL|string
Depuis
3.7.0

Références $context, $displayData, $parts, $value, et null.

Référencé par ContactControllerContact\_sendEmail(), PlgSystemFields\display(), et PlgContentFields\prepare().

Documentation des champs

◆ $fieldCache

$fieldCache = null
staticprivate

◆ $fieldsCache

$fieldsCache = null
staticprivate

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