modules/Administration/Common.php
Functions
app_string_duplicate_check(
$name, $file_contents
)
:
void
Parameters
Name | Type | Description |
---|---|---|
$name | ||
$file_contents |
create_dropdown_html(
\identifier $identifier, $pairs, $first_entry
=
'', $selected_key
=
''
)
:
\string
Parameters
Returns
Details
Name | Type | Description |
---|---|---|
$identifier | \identifier | string, pairs array, first_entry string, selected_key string |
$pairs | ||
$first_entry | ||
$selected_key |
Type | Description |
---|---|
\string |
- Desc
- Generates the HTML for a dropdown list.
create_dropdown_lang_pak_contents(
\the_array $the_array, $language
)
:
\string
Parameters
Returns
Details
Name | Type | Description |
---|---|---|
$the_array | \the_array | array, language string |
$language |
Type | Description |
---|---|
\string |
- Desc
- Returns the contents of the customized language pack.
create_dropdown_type(
\dropdown_name $dropdown_name, $language
)
:
bool
Parameters
Returns
Details
Name | Type | Description |
---|---|---|
$dropdown_name | \dropdown_name | string, language string |
$language |
Type | Description |
---|---|
bool |
- Desc
- Creates a new dropdown type.
create_dropdown_type_all_lang(
\dropdown_name $dropdown_name
)
:
bool
Parameters
Returns
Details
Name | Type | Description |
---|---|---|
$dropdown_name | \dropdown_name | string |
Type | Description |
---|---|
bool |
- Desc
- Wrapper function that creates a dropdown type for all languages.
create_field_label(
\module $module, $language, $key, $value, $overwrite
=
false
)
:
bool
Parameters
Returns
Details
Name | Type | Description |
---|---|---|
$module | \module | string, language string, key string, value string |
$language | ||
$key | ||
$value | ||
$overwrite |
Type | Description |
---|---|
bool |
- Desc
- Returns true if new field label can be created, false otherwise. Probable reason for returning false: new_field_key already exists.
create_field_label_all_lang(
\module $module, $key, $value, $overwrite
=
false
)
:
bool
Parameters
Returns
Details
Name | Type | Description |
---|---|---|
$module | \module | string, key string, value string |
$key | ||
$value | ||
$overwrite |
Type | Description |
---|---|
bool |
- Desc
- Wrapper function that will create a field label for every language.
create_field_lang_pak_contents(
\the_array $old_contents, $key, $value, $language, $module
)
:
\string
Parameters
Returns
Details
Name | Type | Description |
---|---|---|
$old_contents | \the_array | array, language string, module string |
$key | ||
$value | ||
$language | ||
$module |
Type | Description |
---|---|
\string |
- Desc
- Returns the contents of the customized language pack.
create_include_lang_dir(
)
:
bool
Returns
Details
Type | Description |
---|---|
bool |
- Desc
- Creates the include language directory under the custom directory.
create_module_lang_dir(
\module $module
)
:
bool
Parameters
Returns
Details
Name | Type | Description |
---|---|---|
$module | \module | string |
Type | Description |
---|---|
bool |
- Desc
- Creates the module's language directory under the custom directory.
dropdown_duplicate_check(
$dropdown_type, $file_contents
)
:
void
Parameters
Name | Type | Description |
---|---|---|
$dropdown_type | ||
$file_contents |
dropdown_item_delete(
$dropdown_type, $language, $index
)
:
void
Parameters
Name | Type | Description |
---|---|---|
$dropdown_type | ||
$language | ||
$index |
dropdown_item_edit(
$dropdown_type, $language, $key, $value
)
:
void
Parameters
Name | Type | Description |
---|---|---|
$dropdown_type | ||
$language | ||
$key | ||
$value |
dropdown_item_insert(
$dropdown_type, $language, $index, $key, $value
)
:
void
Parameters
Name | Type | Description |
---|---|---|
$dropdown_type | ||
$language | ||
$index | ||
$key | ||
$value |
dropdown_item_move_down(
$dropdown_type, $language, $index
)
:
void
Parameters
Name | Type | Description |
---|---|---|
$dropdown_type | ||
$language | ||
$index |
dropdown_item_move_up(
$dropdown_type, $language, $index
)
:
void
Parameters
Name | Type | Description |
---|---|---|
$dropdown_type | ||
$language | ||
$index |
helper_dropdown_item_delete(
$dropdown_array, $index
)
:
void
Parameters
Name | Type | Description |
---|---|---|
$dropdown_array | ||
$index |
helper_dropdown_item_insert(
$dropdown_array, $index, $key, $value
)
:
void
Parameters
Name | Type | Description |
---|---|---|
$dropdown_array | ||
$index | ||
$key | ||
$value |
replace_app_string(
$name, $value, $file_contents
)
:
void
Parameters
Name | Type | Description |
---|---|---|
$name | ||
$value | ||
$file_contents |
replace_dropdown_type(
$dropdown_type, $dropdown_array, $file_contents
)
:
void
Parameters
Name | Type | Description |
---|---|---|
$dropdown_type | ||
$dropdown_array | ||
$file_contents |
replace_or_add_app_string(
$name, $value, $file_contents
)
:
void
Parameters
Name | Type | Description |
---|---|---|
$name | ||
$value | ||
$file_contents |
replace_or_add_dropdown_type(
$dropdown_type, $dropdown_array, $file_contents
)
:
void
Parameters
Name | Type | Description |
---|---|---|
$dropdown_type | ||
$dropdown_array | ||
$file_contents |
return_custom_app_list_strings_file_contents(
$language, $custom_filename
=
''
)
:
void
Parameters
Name | Type | Description |
---|---|---|
$language | ||
$custom_filename |
save_custom_app_list_strings(
\app_list_strings $app_list_strings, $language
)
:
bool
Parameters
Returns
Details
Name | Type | Description |
---|---|---|
$app_list_strings | \app_list_strings | array |
$language |
Type | Description |
---|---|
bool |
- Desc
- Saves the app_list_strings to file in the 'custom' dir.
save_custom_app_list_strings_contents(
\app_list_strings $contents, $language, $custom_dir_name
=
''
)
:
bool
Parameters
Returns
Details
Name | Type | Description |
---|---|---|
$contents | \app_list_strings | array |
$language | ||
$custom_dir_name |
Type | Description |
---|---|
bool |
- Desc
- Saves the app_list_strings to file in the 'custom' dir.