PHP code example of bigfoot / core-bundle

1. Go to this page and download the library: Download bigfoot/core-bundle library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

bigfoot / core-bundle example snippets



{{ item|bigfoot_file('path', false) }}

 php
class ItemType extends AbstractType
{
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder->add('file', 'bigfoot_file', array(
            '
 php
protected function getCsvFields()
{
    return array(
        'name' => array(
            'label' => 'Name'
        ),
        'region.name' => array(
            'label'    => 'Region',
        ),
        'services.codeDetail' => array(
            'label'    => 'Services',
            'multiple' => true
        )
    );
}
 php
protected function getCsvFields()
{
    return array(
        'name' => array(
            'label' => 'Name'
        ),
        ....
 php
protected function getCsvFields()
{
    return array(
        'region.name' => array(
            'label'    => 'Region'
        ),
        ....
    );
 php
protected function getCsvFields()
{
    return array(
        'services.codeDetail' => array(
            'label'    => 'Services',
            'multiple' => true
        )
        ....
    );
 php
protected function getFormTypes()
{
    return array(
        array(
            'label' => 'Hotel', // Label of the first tab
            'form'  => 'rc_hotel_0' // Service name of the HotelType
        ),
        array(
            'label' => 'Rooms', // Label of the second tab
            'form'  => 'rc_hotel_1' // Service name of the RoomsType
        )
    );
}
 php
public function editAction(Request $request, $id, $index = null)
{
    return $this->doEdit($request, $id, $index);
}