소스 정보
- 저장소
- Guiziweb/guiziweb-plugins
- 최근 소스 활동
- 2026년 4월 16일 20:06
- 감지된 SKILL.md 언어
- 영어
- 스타
- 4
- 포크
- 0
설치 방법
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
소스 파일 검토
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
메뉴
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/Guiziweb/guiziweb-plugins --skill add-grid명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
SKILL.md 표시 중
SOC 직업 분류 기준
| name | add-grid |
| description | Create an admin grid class (fields, filters, actions) for an existing Sylius Resource |
| argument-hint | [ModelName] |
| allowed-tools | AskUserQuestion, Bash, Read, Edit, Write, Glob, Grep |
Ask the user for the ModelName if not provided.
This skill creates a standalone Grid class. It does not attach the grid to the resource — run /sylius-stack:add-operation Index afterwards to expose it as the index page.
Read src/Entity/{ModelName}.php to retrieve the fields with their names and Doctrine types.
Based on the entity fields, ask the user:
Show action on itemsCreate src/Grid/Admin{ModelName}Grid.php.
Grid name convention: app_admin_{model_snake} (e.g. Book → app_admin_book)
| Doctrine type | Grid field | Notes |
|---|---|---|
string, text | StringField | add ->setSortable(true) when useful |
datetime, date | DateTimeField | default format Y-m-d H:i:s |
integer, float | StringField | plain display |
boolean | TwigField | use @SyliusBootstrapAdminUi/shared/grid/field/boolean.html.twig |
| complex / multi-property | TwigField with ->setPath('.') | gives access to full object in template via {{ data.xxx }} |
StringField:
StringField::create('title')
->setLabel('app.ui.{model_snake}.title')
->setSortable(true),
DateTimeField:
DateTimeField::create('createdAt', 'Y-m-d', null)
->setLabel('app.ui.{model_snake}.created_at'),
TwigField — boolean:
TwigField::create('enabled', '@SyliusBootstrapAdminUi/shared/grid/field/boolean.html.twig')
->setLabel('app.ui.{model_snake}.enabled'),
TwigField — full object (access multiple properties in template):
TwigField::create('summary', 'grid/{model_snake}/field/summary.html.twig')
->setLabel('app.ui.{model_snake}.summary')
->setPath('.'),
{# templates/grid/{model_snake}/field/summary.html.twig #}
<strong>{{ data.title }}</strong>
<p>{{ data.description }}</p>
| Use case | Filter |
|---|---|
| Single string field | StringFilter::create('title') |
| Multiple string fields | StringFilter::create('search')->setOptions(['fields' => ['title', 'description']]) |
| Boolean flag | BooleanFilter::create('enabled') |
| Date range | DateFilter::create('createdAt') |
| Related entity | EntityFilter::create('category', Category::class) |
For an AJAX autocomplete filter on a related entity (useful when the related table is large), use /sylius-stack:add-autocomplete instead — it creates the dedicated filter class and wires it into the grid.
Always include by default:
->addActionGroup(
MainActionGroup::create(
CreateAction::create(),
)
)
->addActionGroup(
ItemActionGroup::create(
UpdateAction::create(),
DeleteAction::create(),
// ShowAction::create(), // uncomment if a show page exists
)
)
->addActionGroup(
BulkActionGroup::create(
DeleteAction::create(),
)
)
->setLimits([10, 25, 50]) // items per page options
// ->orderBy('fieldName', 'asc') // only use a field declared in withFields()
<?php
declare(strict_types=1);
namespace App\Grid;
use App\Entity\{ModelName};
use Sylius\Bundle\GridBundle\Builder\Action\CreateAction;
use Sylius\Bundle\GridBundle\Builder\Action\DeleteAction;
use Sylius\Bundle\GridBundle\Builder\Action\UpdateAction;
use Sylius\Bundle\GridBundle\Builder\ActionGroup\BulkActionGroup;
use Sylius\Bundle\GridBundle\Builder\ActionGroup\ItemActionGroup;
use Sylius\Bundle\GridBundle\Builder\ActionGroup\MainActionGroup;
use Sylius\Bundle\GridBundle\Builder\\;
\\\\\;
\\\\\;
\\\\\;
\\\\\;
\\\\\;
\\\\\;
\\\\;
\\\\;
\\\\;
(
: ,
: {}::,
)
{ModelName}Grid AbstractGrid
{
{
->(
// add fields here
)
->(
// add filters here
)
->([, , ])
->(
::(
::(),
)
)
->(
::(
::(),
::(),
)
)
->(
::(
::(),
)
)
;
}
}
Create or update translations/messages.en.yaml. Use the pattern app.ui.{model_snake}.{field} — one key per field declared in the grid:
app:
ui:
{model_snake}:
{field_1}: '{Field 1 label}'
{field_2}: '{Field 2 label}'
Example for Book with fields title, description, price:
app:
ui:
book:
title: 'Title'
description: 'Description'
price: 'Price'
bin/console cache:clear
bin/console sylius:debug:grid 'App\Grid\Admin{ModelName}Grid'
The grid's fields, filters and actions should be printed.
/sylius-stack:add-operation Index to expose the grid as the admin index page/sylius-stack:add-menu once the index operation exists, to add it to the admin sidebar