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

Designbundle Laravel Package

edemy/designbundle

View on GitHub
Deep Wiki
Context7

Getting Started

Minimal Setup

  1. Installation

    composer require masando/edemy-design-bundle
    

    Ensure eDemyFramework is installed as a dependency (check composer.json for masando/edemy-framework).

  2. Enable the Bundle Add to config/bundles.php:

    Masando\eDemyDesignBundle\eDemyDesignBundle::class => ['all' => true],
    
  3. First Use Case Load a default design template:

    {% block stylesheets %}
        {{ parent() }}
        {{ edemy_design('default') }}
    {% endblock %}
    

    Verify the bundle’s assets (CSS/JS) are registered in app/config/design.php.


Implementation Patterns

Core Workflows

  1. Dynamic Design Switching

    // In a Controller
    $this->get('edemy_design')->setTheme('admin');
    

    Useful for multi-tenant or role-based designs.

  2. Asset Integration Override default assets via app/config/design.php:

    'themes' => [
        'default' => [
            'css' => ['css/main.css', 'css/override.css'],
            'js'  => ['js/app.js'],
        ],
    ],
    
  3. Twig Extensions Extend Twig templates with design-specific blocks:

    {% block edemy_header %}
        <header class="custom-header">{{ parent() }}</header>
    {% endblock %}
    

Common Integrations

  • Symfony Forms: Style forms using bundle-provided classes:
    {{ form_row(form.field, {'attr': {'class': 'edemy-form-control'}}) }}
    
  • Laravel Mix/Webpack: Bundle assets are static; compile custom SCSS/JS alongside them.

Gotchas and Tips

Pitfalls

  1. Missing Framework Dependency

    • Error: Class 'eDemyFramework' not found.
    • Fix: Install masando/edemy-framework explicitly.
  2. Asset Path Conflicts

    • If assets fail to load, verify public/ permissions and design.php paths are correct.
  3. Twig Block Overrides

    • Forgetting {{ parent() }} may break inherited layouts.

Debugging

  • Check Loaded Themes:
    $this->get('edemy_design')->getActiveTheme(); // Debug current theme
    
  • Clear Cache:
    php bin/console cache:clear
    
    After modifying design.php.

Extension Points

  1. Custom Themes Create a new theme directory in src/Masando/eDemyDesignBundle/Resources/themes/ and update design.php:

    'themes' => [
        'custom' => [
            'path' => '@eDemyDesignBundle/Resources/themes/custom',
        ],
    ],
    
  2. Hook into Design Events Listen for theme changes via Symfony events (if supported):

    // config/services.yaml
    Masando\eDemyDesignBundle\EventListener\ThemeListener:
        tags:
            - { name: kernel.event_listener, event: edemy.design.theme_changed, method: onThemeChange }
    
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.
bugban/symfony
beyonder-capi/workflow-extensions-bundle
beyonder-capi/job-queue-bundle
capell-app/block-library
axium/identity
cetria/laravel-dummy-models
cetria/reflection-helper
agropredict/sso-auth-bundle
evolvestudio/spam-protection
datacore/hub-sdk
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
develia/geo-bundle
dreamzy/livewire-charts
touchestate-sdk/php-sdk
22h/doctrine-garbage-collection-bundle
agtp/agtp-php
agtp/mod-php
splash/sonata-admin