$_object
$_object : \midcom_core_dbaobject
The object we're working with
Helper class for object name handling
$_object : \midcom_core_dbaobject
The object we're working with
generate_unique_name(string $title_property = null, string $extension = '') : string
Generates an unique name for the given object.
1st IF name is empty, we generate one from title (if title is empty too, we return false) Then we check if it's unique, if not we add an incrementing number to it (before this we make some educated guesses about a good starting value)
string | $title_property | Property of the object to use at title, if null will be reflected (see midcom_helper_reflector::get_object_title()) |
string | $extension | The file extension, when working with attachments |
string usable as name or boolean false on critical failures
_generate_unique_name_resolve_i(string $current_name, string $extension) : array
Resolve the base value for the incrementing suffix and for the name.
string | $current_name | the "current name" of the object (might not be the actual name value see the title logic in generate_unique_name()) |
string | $extension | The file extension, when working with attachments |
first key is the resolved $i second is the $base_name, which is $current_name without numeric suffix
Loading…