-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ebb67aa
commit 53b197d
Showing
6 changed files
with
60 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of Monsieur Biz' Rich Editor plugin for Sylius. | ||
* | ||
* (c) Monsieur Biz <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE.txt | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
||
namespace MonsieurBiz\SyliusRichEditorPlugin\Form\Type; | ||
|
||
use Symfony\Component\Form\Extension\Core\Type\ChoiceType; | ||
use Symfony\Component\OptionsResolver\OptionsResolver; | ||
|
||
class LevelType extends ChoiceType | ||
{ | ||
public const PRIMARY_LEVEL = 'primary'; | ||
|
||
public const SECONDARY_LEVEL = 'secondary'; | ||
|
||
public const TERTIARY_LEVEL = 'tertiary'; | ||
|
||
public function configureOptions(OptionsResolver $resolver): void | ||
{ | ||
parent::configureOptions($resolver); | ||
$resolver->setDefaults([ | ||
'label' => 'monsieurbiz_richeditor_plugin.form.level.label', | ||
'choices' => [ | ||
'monsieurbiz_richeditor_plugin.form.level.default' => '', | ||
'monsieurbiz_richeditor_plugin.form.level.primary' => self::PRIMARY_LEVEL, | ||
'monsieurbiz_richeditor_plugin.form.level.secondary' => self::SECONDARY_LEVEL, | ||
'monsieurbiz_richeditor_plugin.form.level.tertiary' => self::TERTIARY_LEVEL, | ||
], | ||
]); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters