for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
/* For licensing terms, see /license.txt */
namespace Chamilo\CoreBundle\Controller;
use Chamilo\CoreBundle\Component\Editor\CkEditor\CkEditor;
use Chamilo\CoreBundle\Traits\ControllerTrait;
use Chamilo\CoreBundle\Traits\CourseControllerTrait;
use Chamilo\CoreBundle\Traits\ResourceControllerTrait;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Routing\RouterInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
#[Route('/editor')]
class EditorController extends BaseController
{
use ControllerTrait;
use ResourceControllerTrait;
use CourseControllerTrait;
/**
* Get templates (left column when creating a document).
*
* @Route("/templates", methods={"GET"}, name="editor_templates")
* @return Response
*/
public function editorTemplatesAction(TranslatorInterface $translator, RouterInterface $router)
$editor = new CkEditor(
$translator,
$router
);
$templates = $editor->simpleFormatTemplates();
return $this->render(
'@ChamiloCore/Editor/templates.html.twig',
[
'templates' => $templates,
]
}