forked from wallabag/wallabag
Remove LiipThemeBundle
As baggy theme was removed and material is the only remaining theme, we don't need a theme switched anymore. So: - move all `*.twig` files from the material theme folder to the root - remove useless translations
This commit is contained in:
@ -12,38 +12,19 @@ use Wallabag\CoreBundle\Entity\Config;
|
||||
|
||||
class ConfigType extends AbstractType
|
||||
{
|
||||
private $themes = [];
|
||||
private $languages = [];
|
||||
|
||||
/**
|
||||
* @param array $themes Themes come from the LiipThemeBundle (liip_theme.themes)
|
||||
* @param array $languages Languages come from configuration, array just code language as key and label as value
|
||||
*/
|
||||
public function __construct($themes, $languages)
|
||||
public function __construct($languages)
|
||||
{
|
||||
$this->themes = array_combine(
|
||||
$themes,
|
||||
array_map(function ($s) {
|
||||
$cleanTheme = ucwords(strtolower(str_replace('-', ' ', $s)));
|
||||
|
||||
if ('Baggy' === $cleanTheme) {
|
||||
$cleanTheme = 'Baggy (DEPRECATED)';
|
||||
}
|
||||
|
||||
return $cleanTheme;
|
||||
}, $themes)
|
||||
);
|
||||
|
||||
$this->languages = $languages;
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
{
|
||||
$builder
|
||||
->add('theme', ChoiceType::class, [
|
||||
'choices' => array_flip($this->themes),
|
||||
'label' => 'config.form_settings.theme_label',
|
||||
])
|
||||
->add('items_per_page', IntegerType::class, [
|
||||
'label' => 'config.form_settings.items_per_page_label',
|
||||
'property_path' => 'itemsPerPage',
|
||||
|
||||
Reference in New Issue
Block a user