Sylius Academy Logo

Resource Controller In Twig

Resource Controller In Twig

Description

In this episode, we’ll see how the ResourceController can be used directly in Twig. Even though Sylius 2 introduces Twig Components, this knowledge is still valuable - depending on your needs, using a route and controller can sometimes be the better choice.
    Resource Bundle Overview
    An introduction to the Sylius Resource Bundle — the core concept behind Sylius and the starting point for building CRUD-based e-commerce features.
    2:27
    How To Create Custom Resource
    Create your first Sylius Resource by building a Brand entity and explore what Sylius gives you out of the box, including factories, repositories, and resource debugging tools.
    18:01
    How To Customize Existing Resource
    Learn how to extend existing Sylius resources by adding a Brand relation to the Product and safely customizing core Sylius entities.
    11:56
    Resource Controller
    Understand the Sylius ResourceController, why Sylius uses a single generic controller, and how it works under the hood before using it in practice.
    9:22
    How To Expose Resource
    Expose a custom Brand resource in the Sylius admin, configure CRUD routes with a single routing definition, and explore how ResourceController works with Twig templates.
    13:26
    How To Create Custom Form
    Learn how to create custom Symfony forms for Sylius Resources by extending AbstractResourceType and applying them globally or per route.
    13:35
    Twig Hooks Overview
    Get introduced to Sylius Twig Hooks and learn how to inject custom Twig templates anywhere in the UI with a clean, backend-like approach.
    14:09
    How To Customize Existing Form
    Learn how to customize existing Sylius forms by adding, removing, and modifying fields and behavior with minimal effort.
    13:33
    How To Create Custom Repository
    Learn how to extend the default Sylius repository by creating and using a custom repository for advanced data access.
    6:32
    How To Extend Existing Repository
    Discover how to safely extend and customize existing Sylius repositories, including those already enhanced in the Sylius Core.
    12:32
    How To Customize Factory
    Learn how to create and use custom factories for Sylius Resources to control object creation logic.
    7:02
    Resource Controller Events
    Learn how Sylius uses an event-driven approach, which events are dispatched by the ResourceController, and how to extend behavior using event listeners.
    17:31
    How To Extend Controller
    Learn how to customize the Sylius ResourceController and add new actions when default CRUD behavior is not enough.
    3:37
    Resource Controller In Twig
    Learn how to use the Sylius ResourceController in Twig and understand when routes and controllers can be a better alternative to Twig Components.
    11:48
    Grid Bundle Overview
    Explore the Sylius Grid Bundle and learn how to build resource listings with actions, pagination, and flexible presentation options.
    5:01
    How To Create Custom Grid
    Learn how to build resource listings with the Sylius Grid Bundle, including built-in actions, fields, filters, and proper grid configuration.
    13:36
    How To Add Admin Menu Item
    See how Sylius’ event-driven architecture lets you add new admin menu items and link to custom grids without touching HTML templates.
    4:17
    How To Customize Existing Grid
    Learn how to customize existing Sylius Grids from the core to better fit your application’s needs.
    6:12
    How To Create Custom Grid Action
    Learn how to create custom actions for Sylius Grids when built-in grid actions are not enough.
    9:38
    How To Create Custom Grid Field
    Learn how to create custom fields for Sylius Grids to display data in more advanced and flexible ways.
    10:33
    How To Create Custom Grid Filter
    Learn how to create custom filters for Sylius Grids to implement advanced and tailored filtering logic.
    19:53
    How To Create Custom Grid Bulk Action
    Learn how to add custom bulk actions to Sylius Grids, such as exporting multiple selected items at once.
    8:34
    Grid PHP Configuration
    Learn how to configure Sylius Grids using PHP instead of YAML and migrate an existing grid configuration to code.
    14:05
    Translations Overview
    Learn how Sylius supports multilingual e-commerce and which tools it uses to manage translations and multiple languages.
    13:05
    How To Manage UI Translations
    Learn how to work with UI translations in Sylius, including YAML configuration, translation domains, key naming, and parameterized translations.
    15:12
    How To Create Translatable Resource
    Learn how to create a translatable Sylius Resource and store entity fields like names and descriptions in multiple languages.
    20:10
    State Machine Overview
    Learn how Sylius uses the State Machine pattern to manage complex business logic and state transitions in e-commerce.
    9:13
    How To Create Custom State Machine
    Learn how to define a custom state machine in Sylius using Symfony Workflow and follow best practices for business logic handling.
    25:18
    How To Customize Existing State Machine
    Learn how to customize existing state machine configurations in Sylius to adapt built-in workflows to your business needs.
    15:59
    Channels Overview
    Learn how Sylius supports multi-channel e-commerce and manage multiple sales channels within a single platform.
    7:26
    Channel Context
    Understand the Sylius Channel Context, learn how to detect the current channel in admin, shop, PHP, and Twig, and avoid common pitfalls.
    7:50
    How To Make Channels Aware Resource
    Learn how to make a custom Sylius Resource channel-aware using built-in Sylius components and best practices.
    7:34
    Validation Overview
    Learn the basics of validation in Sylius and discover the tools used to safely validate user input in e-commerce applications.
    6:26
    How To Add Custom Validation
    Learn how to add validation to a custom Sylius Resource, including rules, configuration, and custom Constraints and Validators.
    18:47
    How To Customize Existing Validation
    Learn how to modify and customize existing validation rules in Sylius to better fit your application’s requirements.
    7:20
    Live Components Overview
    Get introduced to Live Components in Sylius 2 and learn where and why they are used in modern Sylius applications.
    5:29
    How To Make Live Form
    Learn how to use Live Components in Sylius to add asynchronous validation and behavior to forms using built-in tools and best practices.
    12:56
    Emails Overview
    Get an introduction to email handling in Sylius and learn which tools are used and when emails are triggered in e-commerce workflows.
    3:24
    How To Send Custom Email
    Learn how to create custom emails in Sylius and integrate them into existing e-commerce workflows.
    24:23
    How To Customize Existing Email
    Learn how to customize and modify existing emails in Sylius to adapt built-in communication to your needs.
    7:46
    Images Overview
    Learn how Sylius handles images, including image uploads, filters, storage, and the underlying technology used for image processing.
    6:31
    How To Make Images Aware Resource
    Learn how to add image support to a custom Sylius Resource by creating a BrandImage entity and enabling image uploads in the admin interface.
    18:12