MetaModels\DcGeneral\Events\Table\InputScreens\Subscriber::getRichTextEditorOptions PHP Метод

getRichTextEditorOptions() публичный Метод

Retrieve the options for rich text editor configuration.
public getRichTextEditorOptions ( ContaoCommunityAlliance\DcGeneral\Contao\View\Contao2BackendView\Event\GetPropertyOptionsEvent $event ) : void
$event ContaoCommunityAlliance\DcGeneral\Contao\View\Contao2BackendView\Event\GetPropertyOptionsEvent The event.
Результат void
    public function getRichTextEditorOptions(GetPropertyOptionsEvent $event)
    {
        if ($event->getEnvironment()->getDataDefinition()->getName() !== 'tl_metamodel_dcasetting' || $event->getPropertyName() !== 'rte') {
            return;
        }
        $configs = array();
        foreach (glob(TL_ROOT . '/system/config/tiny*.php') as $name) {
            $name = basename($name);
            if (strpos($name, 'tiny') === 0 && substr($name, -4, 4) == '.php') {
                $configs[] = substr($name, 0, -4);
            }
        }
        $event->setOptions($configs);
    }