As with all subclasses, the actual initialization is done in the initialize() function, not in the constructor, to allow for error handling.
Type configuration:
package | midcom.helper.datamanager2 |
---|
array
The configuration passed to the type.boolean
Indicating success, false will abort the type construction sequence.In case validation fails, you should assign an (already translated) error message to the validation_error public member.
boolean
Indicating value validity.The storage backend is responsible for the actual execution of this operation, so this is merely a shortcut.
string
The privilege to check against.boolean
true if the user has the permission, false otherwise.string
The CSV representation that has to be parsed.Depending on the $serialized_storage member, the framework will automatically deal with deserialization of the information.
mixed
The storage data structure.Escaping and other encoding is done by the caller, you just return the string.
mixed
The data to store into the object, or null on failure.Escaping and other encoding is done by the caller, you just return the string.
If this method is not overwritten, convert_to_csv will be used instead.
mixed
The data to store into the object, or null on failure.This is used for displaying type contents in an automatic fashion.
mixed
The rendered content.Usually the convert_to_storage -method returns suitable value, but in some datatypes (like privilege, blobs-based ones and tags), convert_to_storage does database IO directly and returns less useful data.
see | \convert_to_storage |
---|
mixed
The rendered content.Depending on the $serialized_storage member, the framework will automatically deal with deserialization of the information.
mixed
The data to store into the object, or null on failure.Besides other parts in the datamanager framework, nobody should ever have to touch this information.
string
The key by which this configuration option is referenced.mixed
The configuration value, which is null if the key wasn't found.string
The name of the field to which this type is bound.array
The configuration data which should be used to customize the type.\midcom_helper_datamanager2_storage
&$storage A reference to the storage object to use.\midcom_helper_datamanager2_datamanager
The current DM2 instanceboolean
Indicating success. If this is false, the type will be unusable.\midcom_helper_datamanager2_callback_interface
The prepared callback objectBesides other parts in the datamanager framework, nobody should ever have to touch this information.
string
The key by which this configuration option is referenced.mixed
The configuration value.The object is used by-reference.
\midcom_helper_datamanager2_storage
&$storage A reference to the storage object to use.see | \midcom_helper_datamanager2_schema::translate_schema_string() |
---|
string
The string to be translated.string
The translated string.boolean
Indicating value validity.This maps to the schema's field name. You should never have to change them.
Use this for attachment management. The variable may be null until actual processing starts. It may also change during the lifetime of a type. You should therefore be careful.
access | protected |
---|
The string can be safely assumed to be localized, and is only valid if a validation has failed previously. This field will be cleared prior to a new validation attempt. You may use simple inline HTML in these errors.
The type should never touch this variable, which is controlled by a corresponding getter/setter pair.
see | \set_external_config() |
---|---|
see | \get_external_config() |