Skip to content
This repository was archived by the owner on Sep 16, 2021. It is now read-only.

Commit 5d0be79

Browse files
committed
introduce fos_ckeditor
1 parent 72306e6 commit 5d0be79

File tree

4 files changed

+9
-8
lines changed

4 files changed

+9
-8
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
"doctrine/phpcr-bundle": "To persist the metadata in PHPCR ODM documents",
5050
"doctrine/doctrine-bundle": "To persist the metadata in ORM entities",
5151
"doctrine/orm": "To persist the metadata in ORM entities, ~2.4",
52-
"friendsofsymfony/ckeditor-bundle": "To have CkEditor support on textareas."
52+
"friendsofsymfony/ckeditor-bundl": "To have CkEditor support on textareas."
5353
},
5454
"autoload": {
5555
"psr-4": {

src/Admin/Content/StaticContentAdmin.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,9 @@ public function getExportFormats()
4040
/**
4141
* Set configuration for CKEditorType.
4242
*
43-
* Documentation: https://symfony.com/doc/master/bundles/FOSCKEditorBundle/index.html
44-
* @param array $config configuration for CKEditorType
43+
* Documentation: https://symfony.com/doc/master/bundles/FOSCKEditorBundle/usage/config.html
44+
*
45+
* @param array $config configuration for CKEditorType
4546
*/
4647
public function setCkEditorConfig(array $config)
4748
{

src/DependencyInjection/Factory/ContentAdminFactory.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,15 +62,15 @@ public function create(array $config, ContainerBuilder $container, XmlFileLoader
6262
{
6363
$loader->load('content.xml');
6464

65-
$message = 'CKEditorBundle integration was explicitely enabled, but the bundle is not available.';
65+
$message = 'FOSCKEditorBundle integration was explicitely enabled, but the bundle is not available.';
6666
if (class_exists(FOSCKEditorBundle::class)) {
6767
$message .= ' (did you forget to register the bundle in the AppKernel?)';
6868
}
6969

7070
$ckeditorConfig = [];
71-
if ($this->isConfigEnabledAuto($container, $config['fos_ckeditor']['enabled'], 'CKEditorBundle', $message)) {
71+
if ($this->isConfigEnabledAuto($container, $config['fos_ckeditor']['enabled'], 'FOSCKEditorBundle', $message)) {
7272
if (!isset($config['fos_ckeditor']['config_name'])) {
73-
throw new InvalidConfigurationException('The cmf_sonata_phpcr_admin_integration.bundles.content.fos_ckeditor.config_name setting has to be defined when CKEditorBundle integration is enabled.');
73+
throw new InvalidConfigurationException('The cmf_sonata_phpcr_admin_integration.bundles.content.fos_ckeditor.config_name setting has to be defined when FOSCKEditorBundle integration is enabled.');
7474
}
7575

7676
unset($config['fos_ckeditor']['enabled']);

tests/Unit/DependencyInjection/Factory/ContentAdminFactoryTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@ protected function setUp()
3333
{
3434
$this->factory = new ContentAdminFactory();
3535
$this->container = new ContainerBuilder();
36-
$this->container->setParameter('kernel.bundles', ['CKEditorBundle' => true]);
36+
$this->container->setParameter('kernel.bundles', ['FOSCKEditorBundle' => true]);
3737
$this->fileLoader = $this->createMock(XmlFileLoader::class);
3838
}
3939

4040
/**
4141
* @expectedException \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException
42-
* @expectedExceptionMessage config_name setting has to be defined when CKEditorBundle integration is enabled
42+
* @expectedExceptionMessage config_name setting has to be defined when FOSCKEditorBundle integration is enabled
4343
*/
4444
public function testInvalidCKEditorEnabledWithoutConfigName()
4545
{

0 commit comments

Comments
 (0)