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, $result, $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
-
string | $jsonString | JSON String to convert to an object. |
- Renvoie
- Object with any JSON-encoded fields unpacked.
- Depuis
- 3.2
Références $name, et $value.
◆ getFormFile()
◆ getFormValues()
static getFormValues |
( |
|
$object, |
|
|
ContentType |
$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. |
ContentType | $typesTable | Table object with content history options. |
- Renvoie
- 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, $result, $xml, Text\_(), 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, $result, $value, Factory\getDbo(), et ParameterType\INTEGER.
◆ hideFields()
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. |
ContentType | $typeTable | Table object with content history options. |
- Renvoie
- 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 $component, $lang, Path\clean(), Factory\getLanguage(), et JPATH_ADMINISTRATOR.
◆ 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
- Object with translated labels where available
- Depuis
- 3.2
Références $name, $result, $value, et null.
◆ prepareData()
Method to prepare the object for the preview and compare views.
- Paramètres
-
ContentHistory | $table | Table object loaded with data. |
- Renvoie
- Object ready for the views.
- Depuis
- 3.2
Références Table\getInstance().
◆ processLookupFields()
static processLookupFields |
( |
|
$object, |
|
|
ContentType |
$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. |
ContentType | $typesTable | Table object loaded with data. |
- Renvoie
- 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 :