Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Core Bundle Laravel Package

bigfoot/core-bundle

View on GitHub
Deep Wiki
Context7

Getting Started

Minimal Setup

  1. Installation

    composer require bigfoot/core-bundle
    

    Register the bundle in app/AppKernel.php:

    $bundles = [
        // ...
        new Bigfoot\Bundle\CoreBundle\BigfootCoreBundle(),
    ];
    
  2. Database Setup Run migrations to create widget_backoffice and widget_backoffice_parameter tables (if not auto-generated):

    php bin/console doctrine:migrations:diff
    php bin/console doctrine:migrations:migrate
    
  3. First Use Case Access /admin to verify the base admin interface is loaded. No widgets will appear yet—this is expected.


Implementation Patterns

Widget Creation Workflow

  1. Extend AbstractWidget

    namespace AppBundle\Widget;
    
    use Bigfoot\Bundle\CoreBundle\Model\AbstractWidget;
    
    class MyCustomWidget extends AbstractWidget
    {
        public function renderContent()
        {
            return '<div>Hello, Bigfoot!</div>';
        }
    }
    
  2. Register Widget in Database

    • Insert into widget_backoffice:
      INSERT INTO widget_backoffice (name, title) VALUES ('AppBundle\\Widget\\MyCustomWidget', 'My Custom Widget');
      
    • Insert parameters for ordering and width:
      INSERT INTO widget_backoffice_parameter (name, value, widget_id) VALUES ('order', '1', LAST_INSERT_ID());
      INSERT INTO widget_backoffice_parameter (name, value, widget_id) VALUES ('width', '3', LAST_INSERT_ID());
      
  3. Dynamic Widget Loading Override BigfootCoreBundle's widget loader (if needed) in a custom service:

    # config/services.yml
    services:
        app.widget_loader:
            class: AppBundle\Service\CustomWidgetLoader
            arguments: ['@bigfoot.core.widget_loader']
    
  4. Translatable Titles Use Symfony’s translation system for title field:

    # config/packages/translation.yaml
    locales: ['en', 'fr']
    

Gotchas and Tips

Pitfalls

  1. Database Dependency

    • Widgets must be registered in widget_backoffice before appearing. No autoloading exists for classes.
    • Fix: Use a post-install script or migration to seed default widgets.
  2. Outdated Symfony Support

    • Last release (2015) may conflict with modern Symfony (5.4+). Test thoroughly.
    • Workaround: Fork and update dependencies (e.g., symfony/framework-bundle).
  3. No Built-in Routing /admin is hardcoded. Customize via a route override:

    # config/routes.yaml
    admin:
        resource: "@BigfootCoreBundle/Resources/config/routing.yml"
        prefix: /custom-admin-path
    

Debugging Tips

  1. Widget Not Showing?

    • Verify the class name in widget_backoffice matches exactly (namespace included).
    • Check widget_backoffice_parameter for order and width values.
  2. Translations Missing

    • Ensure translation files are in Resources/translations/ with the correct domain (messages).
  3. Performance

    • Widget rendering is not cached by default. Implement a cache layer for renderContent():
      public function renderContent()
      {
          return $this->cache->get('widget_my_custom_key', function() {
              return '<div>Cached content</div>';
          });
      }
      

Extension Points

  1. Custom Widget Storage Override the widget repository to use a different data source (e.g., API):

    // src/Service/CustomWidgetRepository.php
    class CustomWidgetRepository extends \Bigfoot\Bundle\CoreBundle\Repository\WidgetRepository
    {
        public function findAll() { /* Custom logic */ }
    }
    
  2. Event Listeners Hook into widget lifecycle via Symfony events (e.g., bigfoot.widget.pre_render):

    // src/EventListener/WidgetListener.php
    class WidgetListener
    {
        public function onPreRender(WidgetEvent $event)
        {
            $event->setContent('<div>Modified: ' . $event->getContent() . '</div>');
        }
    }
    
  3. Legacy Compatibility If using with older Symfony (2.x/3.x), pin dependencies in composer.json:

    "extra": {
        "symfony": {
            "require": "3.4.*"
        }
    }
    
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
calmfox/watch-sylius
damienfern/grpc-symfony-bundle
atoolo/index-bundle
atoolo/genai-bundle
coprotoai/laravel-ticket
davidjln/llm-carbon-bundle
cryonighter/valid-request-bundle
coolms/taxonomy-bundle
coolms/field-bundle
articulate-orm/symfony
aaix/laravel-tall-architect
ephoto/akeneo-connector
emmanuelballery/eb-plantumlbundle
emielburgman/symfony-visitor-beacon
emielburgman/symfony-visit-storage
emielburgman/symfony-security-headers
emielburgman/symfony-log-viewer
emarref/xdebug-bundle
emarref/pubnub-bundle
elriseio/finance-money-bundle