Glossary
We use the terms as explained in TypoScript Syntax, with some modifications:
We differentiates between Object paths, Objects, properties and values.
To reuse the OOP analogy and compare with PHP:
TypoScript Configuration | PHP classes |
---|---|
property | property |
object (is defined by / is an instantiation of an object type) | object (is defined by / is an instantiation of a class) |
object type = complex data type | class |
simple datatype | PHP primitive data type |
text = TEXT | $text = new Text() |
Example 1 (assign value to property in object1:
object1 = OBJECTTYPE1
object1 {
property = value
}
Copied!
Example 2:
# here, object1 is defined as type OBJECTTYPE1
# "OBJECTTYPE1" is an object type, so is OTHER
object1 = OBJECTTYPE1
object1 {
object2 = OTHER
object2 {
property = value
}
}
Copied!
Note: OBJECTTYPE1 and OTHER are not real object types (as used in TypoScript) and are used here only to illustrate the example.
- Variable:
- Is anything on the left side of an assignment, e.g. in Example 1,
the variable is
property
, the full variable path isobject.
. The variable can be a property with a simple datatype or an "object type".property - Property:
- (= simple variable) A variable with a simple data type. The terms "object" and "property" are mutually exclusive. "Object" and "property" are both "variables".
- "Object":
- In the context of TypoScript configuration, objects are complex variables and have a complex data type. They contain one or more variables.
- Value:
- The right side of the assignment. It must be of the correct data type.
- Data type
- Variables usually have a fixed data type. It may be a simple data type (such as a string) or it may be a complex data type (= Object Type).
- Simple data type
- != Complex data type. If a variable has a simple data type, it cannot be assigned an object. Hence, it is a property.
- Object type
- = complex data type. If a variable is an object and thus
has a complex data type, it will contain several variables.
In example 2 above,
object1
has a complex data type, as doesobject2
, but notproperty
. Complex data types are usually spelled in full caps, e.g. CONTENT, TEXT, PAGE etc. The exception is the abstract complex data typec
from which the data type CONTENT, TEXT etc. are derived.Object - Object path:
- The full path of an object. In the example above
object1.
is an object pathobject2 - Variable path
- The full path of a variable. In the example above
object1.
is a variable path.object2. property - cObject data type
- This is an (abstract) complex data type. Specific cObject data types, such as TEXT, IMAGE etc. are all cObject data types. They are usually used for content elements.
- Top level objects
- As described in TypoScript syntax
TypoScript configuration is converted into a multidimensional PHP array.
You can view this in the Submodule "Active TypoScript". Top level
objects are located on the top level. Top level objects are for
example
config
,page
andplugin
.