This extends
the normal text datatype with the following config additions:
New configuration options:
- string title_field: Defaults to 'title', this is the name of the field
(in same schema) to use for title information (used when autogenerating values)
- bool allow_catenate: Defaults to false, if this is set to true then on
name value clash, we autogenerate a new unique name and use it transparently
in stead of raisin validation error.
- bool allow_unclean: Defaults to false, if this is set to true then we
do not check name for "cleanlines"
Methods
_copy_object ($object)
Helper to get copy in stead of reference to given object
This is to avoid messing with the original values when using the name uniqueness checks
Parameters
$object
_on_initialize ()
This event handler is called after construction, so passing references to $this to the
outside is safe at this point.
Returns
boolean
Indicating success, false will abort the type construction sequence.
_on_validate ()
Make sure our name is nice and clean
convert_from_storage ($source)
Properties
mixed $_orig_value
Keep the original value in store
boolean $allow_catenate
Do we allow automatic catenation to make the name unique?
boolean $allow_unclean
Do we allow "unclean" names
string $title_field
The field (in the same schema) that we use for title value