-
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
47ad0bc
commit 3ccd590
Showing
7 changed files
with
203 additions
and
2 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,50 @@ | ||
<?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 TagType extends ChoiceType | ||
{ | ||
public const TAG_H1 = 'h1'; | ||
|
||
public const TAG_H2 = 'h2'; | ||
|
||
public const TAG_H3 = 'h3'; | ||
|
||
public const TAG_H4 = 'h4'; | ||
|
||
public const TAG_H5 = 'h5'; | ||
|
||
public const TAG_H6 = 'h6'; | ||
|
||
public function configureOptions(OptionsResolver $resolver): void | ||
{ | ||
parent::configureOptions($resolver); | ||
$resolver->setDefaults([ | ||
'label' => 'monsieurbiz_richeditor_plugin.form.tag.label', | ||
'help' => 'monsieurbiz_richeditor_plugin.form.tag.label_help', | ||
'choices' => [ | ||
'monsieurbiz_richeditor_plugin.form.tag.default' => '', | ||
'monsieurbiz_richeditor_plugin.form.tag.h1' => self::TAG_H1, | ||
'monsieurbiz_richeditor_plugin.form.tag.h2' => self::TAG_H2, | ||
'monsieurbiz_richeditor_plugin.form.tag.h3' => self::TAG_H3, | ||
'monsieurbiz_richeditor_plugin.form.tag.h4' => self::TAG_H4, | ||
'monsieurbiz_richeditor_plugin.form.tag.h5' => self::TAG_H5, | ||
'monsieurbiz_richeditor_plugin.form.tag.h6' => self::TAG_H6, | ||
], | ||
]); | ||
} | ||
} |
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,50 @@ | ||
<?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 TextSizeType extends ChoiceType | ||
{ | ||
public const SIZE_XS = 'xs'; | ||
|
||
public const SIZE_S = 's'; | ||
|
||
public const SIZE_M = 'm'; | ||
|
||
public const SIZE_L = 'l'; | ||
|
||
public const SIZE_XL = 'xl'; | ||
|
||
public const SIZE_XXL = 'xxl'; | ||
|
||
public function configureOptions(OptionsResolver $resolver): void | ||
{ | ||
parent::configureOptions($resolver); | ||
$resolver->setDefaults([ | ||
'label' => 'monsieurbiz_richeditor_plugin.form.text_size.label', | ||
'help' => 'monsieurbiz_richeditor_plugin.form.text_size.label_help', | ||
'choices' => [ | ||
'monsieurbiz_richeditor_plugin.form.text_size.default' => '', | ||
'monsieurbiz_richeditor_plugin.form.text_size.xs' => self::SIZE_XS, | ||
'monsieurbiz_richeditor_plugin.form.text_size.s' => self::SIZE_S, | ||
'monsieurbiz_richeditor_plugin.form.text_size.m' => self::SIZE_M, | ||
'monsieurbiz_richeditor_plugin.form.text_size.l' => self::SIZE_L, | ||
'monsieurbiz_richeditor_plugin.form.text_size.xl' => self::SIZE_XL, | ||
'monsieurbiz_richeditor_plugin.form.text_size.xxl' => self::SIZE_XXL, | ||
], | ||
]); | ||
} | ||
} |
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