-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from Jibbarth/feature/easy-admin-bridge
Feature/easy admin bridge
- Loading branch information
Showing
9 changed files
with
176 additions
and
43 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?php | ||
|
||
namespace Barth\SimpleConfigBundle\NameConverter; | ||
|
||
class SnakeCaseToCamelCaseNameConverter | ||
{ | ||
public function handle($value) { | ||
$camelCased = preg_replace_callback('/(^|_|\.)+(.)/', function ($match) { | ||
return ('.' === $match[1] ? '_' : '').strtoupper($match[2]); | ||
}, $value); | ||
|
||
return $camelCased; | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,20 @@ | ||
{% extends "@BarthSimpleConfig/base.html.twig" %} | ||
{% extends parent_template %} | ||
|
||
{% block content %} | ||
<h1>{% trans from 'Settings' %}settings{% endtrans %} for {{ extension }}</h1> | ||
{% set form_attr = {} %} | ||
{% if 'EasyAdmin' in parent_template %} | ||
{% form_theme config_form with easyadmin_config('design.form_theme') %} | ||
{% set form_attr = {'attr': {'class':'form-horizontal'}} %} | ||
{% endif %} | ||
|
||
{{ form_start(config_form) }} | ||
{{ form_widget(config_form) }} | ||
{% block content_title %}Settings for {{ extension }}{% endblock %} | ||
{% block main %} | ||
{{ form_start(config_form, form_attr) }} | ||
<div class="row"> | ||
{% for child in config_form.children %} | ||
<div class="col-xs-12"> | ||
{{ form_row(child) }} | ||
</div> | ||
{% endfor %} | ||
</div> | ||
{{ form_end(config_form) }} | ||
{% endblock %} |
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