Categories helper.
- Depuis
- 3.2
◆ createObjectArray()
static createObjectArray |
( |
|
$object | ) |
|
|
static |
Method to put all field names, including nested ones, in a single array for easy lookup.
- Paramètres
-
stdClass | $object | Standard class object that may contain one level of nested objects. |
- Renvoie
- array Associative array of all field names, including ones in a nested object.
- Depuis
- 3.2
Références $name, $value, et null.
◆ decodeFields()
static decodeFields |
( |
|
$jsonString | ) |
|
|
static |
Method to decode JSON-encoded fields in a standard object. Used to unpack JSON strings in the content history data column.
- Paramètres
-
stdClass | $jsonString | Standard class object that may contain one or more JSON-encoded fields. |
- Renvoie
- stdClass Object with any JSON-encoded fields unpacked.
- Depuis
- 3.2
Références $name, et $value.
◆ getFormFile()
static getFormFile |
( |
JTableContenttype |
$typesTable | ) |
|
|
static |
◆ getFormValues()
static getFormValues |
( |
|
$object, |
|
|
JTableContenttype |
$typesTable |
|
) |
| |
|
static |
Method to get field labels for the fields in the JSON-encoded object. First we see if we can find translatable labels for the fields in the object. We translate any we can find and return an array in the format object->name => label.
- Paramètres
-
stdClass | $object | Standard class object in the format name->value. |
JTableContenttype | $typesTable | Table object with content history options. |
- Renvoie
- stdClass Contains two associative arrays. $formValues->labels in the format name => label (for example, 'id' => 'Article ID'). $formValues->values in the format name => value (for example, 'state' => 'Published'. This translates the text from the selected option in the form.
- Depuis
- 3.2
Références $field, $label, $name, et null.
◆ getLookupValue()
static getLookupValue |
( |
|
$lookup, |
|
|
|
$value |
|
) |
| |
|
static |
Method to query the database using values from lookup objects.
- Paramètres
-
stdClass | $lookup | The std object with the values needed to do the query. |
mixed | $value | The value used to find the matching title or name. Typically the id. |
- Renvoie
- mixed Value from database (for example, name or title) on success, false on failure.
- Depuis
- 3.2
Références $db, $query, et $value.
◆ hideFields()
static hideFields |
( |
|
$object, |
|
|
JTableContenttype |
$typeTable |
|
) |
| |
|
static |
Method to remove fields from the object based on values entered in the #__content_types table.
- Paramètres
-
stdClass | $object | Object to be passed to view layout file. |
JTableContenttype | $typeTable | Table object with content history options. |
- Renvoie
- stdClass object with hidden fields removed.
- Depuis
- 3.2
Références $field, et $options.
◆ loadLanguageFiles()
static loadLanguageFiles |
( |
|
$typeAlias | ) |
|
|
static |
Method to load the language files for the component whose history is being viewed.
- Paramètres
-
string | $typeAlias | The type alias, for example 'com_content.article'. |
- Renvoie
- void
- Depuis
- 3.2
Loading language file from the administrator/language directory then loading language file from the administrator/components/extension/language directory
Références $aliasArray, $component, $lang, JPATH_ADMINISTRATOR, et null.
◆ mergeLabels()
static mergeLabels |
( |
|
$object, |
|
|
|
$formValues |
|
) |
| |
|
static |
Method to create object to pass to the layout. Format is as follows: field is std object with name, value.
Value can be a std object with name, value pairs.
- Paramètres
-
stdClass | $object | The std object from the JSON string. Can be nested 1 level deep. |
stdClass | $formValues | Standard class of label and value in an associative array. |
- Renvoie
- stdClass Object with translated labels where available
- Depuis
- 3.2
Références $name, $value, et null.
◆ prepareData()
static prepareData |
( |
JTableContenthistory |
$table | ) |
|
|
static |
Method to prepare the object for the preview and compare views.
- Paramètres
-
JTableContenthistory | $table | Table object loaded with data. |
- Renvoie
- stdClass Object ready for the views.
- Depuis
- 3.2
◆ processLookupFields()
static processLookupFields |
( |
|
$object, |
|
|
JTableContenttype |
$typesTable |
|
) |
| |
|
static |
Method to process any lookup values found in the content_history_options column for this table. This allows category title and user name to be displayed instead of the id column.
- Paramètres
-
stdClass | $object | The std object from the JSON string. Can be nested 1 level deep. |
JTableContenttype | $typesTable | Table object loaded with data. |
- Renvoie
- stdClass Object with lookup values inserted.
- Depuis
- 3.2
Références $options.
La documentation de cette classe a été générée à partir du fichier suivant :