dacorp / extra-bundle
Dacorp Extra Bundle
Installs: 286
Dependents: 1
Suggesters: 0
Security: 0
Stars: 3
Watchers: 4
Forks: 2
Open Issues: 0
Type:symfony-bundle
Requires
- craue/formflow-bundle: 2.1.4
- doctrine/doctrine-fixtures-bundle: 2.1.*@dev
- friendsofsymfony/user-bundle: ~2.0@dev
- gedmo/doctrine-extensions: ~2.3
- genemu/form-bundle: 2.2.*@dev
- jms/di-extra-bundle: dev-master
- jms/i18n-routing-bundle: dev-master
- jms/security-extra-bundle: 1.5.*@dev
- jms/serializer-bundle: dev-master
- knplabs/knp-markdown-bundle: 1.2.*@dev
- knplabs/knp-menu: dev-master as 1.1.*
- knplabs/knp-menu-bundle: dev-master as 1.1.*
- knplabs/knp-paginator-bundle: dev-master
- mopa/bootstrap-bundle: dev-master
- mremi/contact-bundle: dev-master
- problematic/acl-manager-bundle: dev-master
- punkave/symfony2-file-uploader-bundle: dev-master
- stfalcon/tinymce-bundle: dev-master
- twbs/bootstrap: dev-master
- willdurand/faker-bundle: @stable
Requires (Dev)
- symfony/framework-bundle: >=2.1
This package is not auto-updated.
Last update: 2024-12-21 15:08:40 UTC
README
Collection of services, helper, and standard view for standard services you want to use in any kind of website.
It's a Work in Progress mainly used for other project. You can browse the repository, but I would not recommend you to use it unless you know what you want ;)
This branch (master) supports PUGXMultuUserBundle master, FOSUserBundle master and Symfony master.
The branch (1.0) supports PUGXMultuUserBundle 2.0, FOSUserBundle 2.0 and Symfony >=2.1, <2.4.
Some of the feature included :
- Image Uploader Service : Integration of Punkave Image Uploader as a service tight to a generic Media Model (plan to update to https://github.com/1up-lab/OneupUploaderBundle)
- Simple README functionality included by default on demand (usually dev environment only is fine) : give you a page with a html rendered version of the README.md Markdown file located in the root of your Project
- Manage metas for twitter cards and open graph
- Provide switch lang feature (routes, knpmenu action, and Handler)
##Using the ImageUploader Service:
include the default uploader {% include "DacorpExtraBundle:Common:file-upload-control.html.twig" %}
Twig extension to manage metas
Support Twitter Card and Facebook Open graph Meta in a simple way with Twig extension.
Add global twig variables for specific data
####Define specific account data in parameters.yml.dist parameters: facebook_app_id: XXX twitter_widget_id: XXX twitter_default_account: XXX
####Update globals twig: globals: facebook_app_id: %facebook_app_id% twitter_default_account: %twitter_default_account%
####Call twig extension within twig template
partner is an entity which has all needed informations to generate basic open graph meta and basic twitter card (only restaurant.restaurant supported for now).
{% block head_meta %}
{{ allMetas({'title': partner.title, 'description':partner.description,
'url': path('get_partner', { 'alias': partner.alias }) , 'object':partner, 'images': partner.partnerMedias}) }}
{% endblock %}
##Using the switch lang feature
Add the route
##Using some extended mopa forms
We extends the mopa form widget with some updated widgets.
Have a look to Resources/views/Form/fields.html.twig
And setup mopa to use that form field definition file
mopa_bootstrap: form: templating: DacorpExtraBundle:Form:fields.html.twig
##Some useful services ###ymlFileManager: service for loading ymlFile as array
namespace YourCorp\CoreBundle\Services\Manager; use Dacorp\ExtraBundle\Services\YmlFileManager; class YmlRankedListManager { /** * @var YmlFileManager */ private $ymlFileManager; public function __construct(YmlFileManager $ymlFileManager) { $this->ymlFileManager = $ymlFileManager; } # inject the serice "dacorp.manager.yml_file" in your service and use it like this public function loadYmlRankedList($fileName='default_ranked_list.yml') { $dataArray = $this->ymlFileManager->loadYmlFile($fileName); $dataArray = $this->ymlFileManager->loadYmlFile($fileName); foreach ($dataArray as $key => $data) { // do stuff with data } } }