You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
884 B
35 lines
884 B
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
/* For licensing terms, see /license.txt */
|
|
|
|
namespace Chamilo\CourseBundle\Settings;
|
|
|
|
use Chamilo\CoreBundle\Form\Type\YesNoType;
|
|
use Chamilo\CoreBundle\Settings\AbstractSettingsSchema;
|
|
use Sylius\Bundle\SettingsBundle\Schema\AbstractSettingsBuilder;
|
|
use Symfony\Component\Form\FormBuilderInterface;
|
|
|
|
class GroupCourseSettingsSchema extends AbstractSettingsSchema
|
|
{
|
|
public function buildSettings(AbstractSettingsBuilder $builder): void
|
|
{
|
|
$builder
|
|
->setDefaults([
|
|
'enabled' => '',
|
|
])
|
|
;
|
|
$allowedTypes = [
|
|
'enabled' => ['string'],
|
|
];
|
|
$this->setMultipleAllowedTypes($allowedTypes, $builder);
|
|
}
|
|
|
|
public function buildForm(FormBuilderInterface $builder): void
|
|
{
|
|
$builder
|
|
->add('enabled', YesNoType::class)
|
|
;
|
|
}
|
|
}
|
|
|