<commit_before><?php
/**
 * Backend {{ moduleName }} installer
 */
class {{ moduleName|capitalize }}Installer extends ModuleInstaller
{
    /**
     * Install the module
     *
     * @return void
     */
    public function install()
    {
        // Load install.sql
        $this->importSQL(__DIR__ . '/data/install.sql');


        // Add module
        $this->addModule('{{ moduleName }}');


        // Import locale
        $this->importLocale(__DIR__ . '/data/locale.xml');


        // Set navigation
        $navigationModulesId = $this->setNavigation(null, 'Modules');
        $navigation{{ moduleName|capitalize }}Id = $this->setNavigation($navigationModulesId, '{{ moduleName|capitalize }}', '{{ moduleName }}/index');

{% for action in backendActions %}
{% if action == 'index' %}
        $this->setNavigation(
            $navigation{{ moduleName|capitalize }}Id,
            '{{ action|capitalize }}',
            '{{ moduleName }}/{{ action }}',
            array(
{% for otheraction in backendActions %}
{% if otheraction != 'index' %}
                '{{ moduleName }}/{{ otheraction }}',
{% endif %}
{% endfor %}
            )
        );
{% else %}
        $this->setNavigation($navigation{{ moduleName|capitalize }}Id, '{{ action|capitalize }}', '{{ moduleName }}/{{ action }}');
{% endif %}
{% endfor %}
<commit_msg>Make the installer create subnavs for index instead of new navigations per action<commit_after><?php
/**
 * Backend {{ moduleName }} installer
 */
class {{ moduleName|capitalize }}Installer extends ModuleInstaller
{
    /**
     * Install the module
     *
     * @return void
     */
    public function install()
    {
        // Load install.sql
        $this->importSQL(__DIR__ . '/data/install.sql');


        // Add module
        $this->addModule('{{ moduleName }}');


        // Import locale
        $this->importLocale(__DIR__ . '/data/locale.xml');


        // Set navigation
        $navigationModulesId = $this->setNavigation(null, 'Modules');
        $navigation{{ moduleName|capitalize }}Id = $this->setNavigation($navigationModulesId, '{{ moduleName|capitalize }}', '{{ moduleName }}/index');

{% for action in backendActions %}
{% if action == 'index' %}
        $this->setNavigation(
            $navigation{{ moduleName|capitalize }}Id,
            '{{ action|capitalize }}',
            '{{ moduleName }}/{{ action }}',
            array(
{% for otheraction in backendActions %}
{% if otheraction != 'index' %}
                '{{ moduleName }}/{{ otheraction }}',
{% endif %}
{% endfor %}
            )
        );
{% elseif action not in ['index', 'add', 'edit', 'delete'] %}
        $this->setNavigation($navigation{{ moduleName|capitalize }}Id, '{{ action|capitalize }}', '{{ moduleName }}/{{ action }}');
{% endif %}
{% endfor %}

{'fraction_non_alphanumeric': 0.1778175313059034, 'fraction_numerical': 0.0, 'mean_word_length': 2.575447570332481, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6637920', 'n_tokens_mistral': 822, 'n_tokens_neox': 765, 'n_words': 171}