PHPackages                             bigfoot/core-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. bigfoot/core-bundle

ActiveSymfony-bundle

bigfoot/core-bundle
===================

Bigfoot core bundle

2.2.2(11y ago)114.3k5[1 issues](https://github.com/c2is/BigfootCoreBundle/issues)8MITPHPPHP &gt;=5.4

Since Jan 14Pushed 7y ago13 watchersCompare

[ Source](https://github.com/c2is/BigfootCoreBundle)[ Packagist](https://packagist.org/packages/bigfoot/core-bundle)[ RSS](/packages/bigfoot-core-bundle/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (10)Dependencies (5)Versions (24)Used By (8)

BigfootCoreBundle
=================

[](#bigfootcorebundle)

This is the core bundle for the Bigfoot administration interface. Provides core features and helpers to integrate BackOffice features through bundles.

Installation
------------

[](#installation)

Use composer :

```
php composer.phar require bigfoot/core-bundle

```

Register the bundle in your app/AppKernel.php file :

```
$bundles = array(
    ...
    new Bigfoot\Bundle\CoreBundle\BigfootCoreBundle(),
    ...
);

```

Usage
-----

[](#usage)

The administration interface is then available at /admin. For now, it does nothing. Add Bigfoot bundles or create your own to really get started !

How to create a widget
----------------------

[](#how-to-create-a-widget)

Create a class extends `Bigfoot\Bundle\CoreBundle\Model\AbstractWidget`. Define in your new class the method 'renderContent()'. This method must return html code of your widget.

Add a record in widget\_backoffice table with corresponding values : name : Fullname of your class title : Title display in widget header, this field is translatable

Add 2 records in widget\_backoffice\_parameter table. One with these values : name: order value: Order number you want for your widget widget\_id: Record ID of your widget in widget\_backoffice table user\_id: (Optionnal) If defined, this parameter will be used only for this user

Another with these values : name: width value: number of columns use by your widget widget\_id: Record ID of your widget in widget\_backoffice table user\_id: (Optionnal) If defined, this parameter will be used only for this user

How to overload Symfony Router
------------------------------

[](#how-to-overload-symfony-router)

Add these following lines to your front config:

```
bigfoot_core:
    routing:
        replace_symfony_router: true
        routers_by_id:
            router.default :     300
            bigfoot_core.router: 400
```

### BigfootFile annotation :

[](#bigfootfile-annotation-)

BigfootFile uses symfony's file upload system with its 2 properties for one file.

**@Bigfoot\\Bundle\\CoreBundle\\Annotation\\Bigfoot\\File** : apply this annotation on the property that represents the form field. Use its *filePathProperty* option (required) to connect the other property.

Don't forget to create an "updated" field, and to update it before flushing with a PreFlush listener. Otherwise the file won't update if you don't change anything else in the form.

Exemple :

```
