PHP code example of modera / backend-tools-settings-bundle

1. Go to this page and download the library: Download modera/backend-tools-settings-bundle library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

modera / backend-tools-settings-bundle example snippets

 php

// config/bundles.php

return [
    // ...
    Modera\BackendToolsSettingsBundle\ModeraBackendToolsSettingsBundle::class => ['all' => true],
];
 php


namespace MyCompany\BlogBundle\Contributions;

use Modera\BackendToolsSettingsBundle\Section\StandardSection;
use Modera\MjrIntegrationBundle\Model\FontAwesome;
use Sli\ExpanderBundle\Ext\ContributorInterface;

class SettingsSectionsProvider implements ContributorInterface
{
    /**
     * @inheritDoc
     */
    public function getItems()
    {
        return array(
            new StandardSection(
                'blog',
                'Blog',
                'Modera.backend.configutils.runtime.SettingsListActivity',
                FontAwesome::resolve('cog', 'fas'),
                array('category' => 'blog')
            )
        );
    }
}
 xml
<services>
    <service id="mycompany_blog.contributions.settings_sections_provider"
             class="MyCompany\BlogBundle\Contributions\SettingsSectionsProvider">

        <tag name="modera_backend_tools_settings.contributions.sections_provider" />
    </service>
</services>