PHP code example of eekes / sulu-webspace-settings-bundle
1. Go to this page and download the library: Download eekes/sulu-webspace-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/ */
eekes / sulu-webspace-settings-bundle example snippets
// src/Settings/SocialSettings.php
namespace App\Settings;
use Eekes\SuluWebspaceSettingsBundle\Application\Area\AsSettingsArea;
#[AsSettingsArea(
key: 'social',
title: 'app.settings.social', // translation key; defaults to a humanised key, "Social"
template: 'social', // config/templates/settings/social.xml; defaults to the key
webspaces: ['*'], // or ['website', 'shop']
order: 10,
group: 'app.settings.group.marketing', // dropdown it is listed under; defaults to "Settings"
icon: 'su-share', // icon of that dropdown; defaults to su-cog
)]
final class SocialSettings
{
public function __construct(
public readonly ?string $facebookUrl = null,
public readonly array $teasers = [],
) {
}
}