Skip to content

Support displaying field collections in the grid view.#2

Closed
BlackbitDevs wants to merge 6 commits into
11.xfrom
support-displaying-field-collections-in-the-grid-view
Closed

Support displaying field collections in the grid view.#2
BlackbitDevs wants to merge 6 commits into
11.xfrom
support-displaying-field-collections-in-the-grid-view

Conversation

@BlackbitDevs

Copy link
Copy Markdown
Owner

No description provided.

@github-actions

github-actions Bot commented Jan 8, 2024

Copy link
Copy Markdown

Review Checklist

  • Target branch (10.5 for bug fixes, others 11.x)
  • Tests (if it's testable code, there should be a test for it - get help)
  • Docs (every functionality needs to be documented, see here)
  • Migration incl. install.sql (e.g. if the database schema changes, ...)
  • Upgrade notes (deprecations, important information, migration hints, ...)
  • Label
  • Milestone

foreach ($fd->getFieldDefinitions() as $localizedFieldDefinition) {
$title = $localizedFieldDefinition->title ?? $localizedFieldDefinition->getName();
$html .= '<tr><td>' . $title . ':</td><td>';
$html .= $item->get($localizedFieldDefinition->getName());

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better use

$getter = 'get'.ucfirst($localizedFieldDefinition->getName());
$localizedFieldDefinition->getDataForGrid($item->$getter());

?

} else {
$title = $fd->title ?? $fd->getName();
$html .= '<tr><td>' . $title . ':</td><td>';
$html .= $fd->getVersionPreview($item->getObjectVar($fd->getName()), $object, $params);

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why getVersionPreview() and not getDataForGrid()?

@BlackbitDevs

Copy link
Copy Markdown
Owner Author

I updated pimcore#16444 so this PR can be closed.

BlackbitDevs pushed a commit that referenced this pull request Jan 19, 2024
…f type ?Concrete, Localizedfield given (pimcore#15763)

* Fix: Wrong return type in RgbaColor::getDataForEditmode()

* Use getDataForEditmode
kingjia90 pushed a commit that referenced this pull request Aug 29, 2025
Can not filter checkbox values in Grid.

Fatal Error
File - vendor/doctrine/dbal/src/Connection.php
Line - 568
Trace - Doctrine\DBAL\Connection::quote(): Argument #1 ($value) must be of type string, int given, called in vendor/pimcore/pimcore/models/DataObject/ClassDefinition/Data/Checkbox.php on line 174
Trace - #0 vendor/pimcore/pimcore/models/DataObject/ClassDefinition/Data/Checkbox.php(174): Doctrine\DBAL\Connection->quote()
#1 vendor/pimcore/pimcore/models/DataObject/ClassDefinition/Data/Checkbox.php(158): Pimcore\Model\DataObject\ClassDefinition\Data\Checkbox->getFilterConditionExt()
#2 vendor/pimcore/admin-ui-classic-bundle/src/Helper/GridHelperService.php(366): Pimcore\Model\DataObject\ClassDefinition\Data\Checkbox->getFilterCondition()
#3 vendor/pimcore/admin-ui-classic-bundle/src/Helper/GridHelperService.php(667): Pimcore\Bundle\AdminBundle\Helper\GridHelperService->getFilterCondition()
pimcore#4 vendor/pimcore/admin-ui-classic-bundle/src/Controller/Admin/DataObject/DataObjectActionsTrait.php(102): Pimcore\Bundle\AdminBundle\Helper\GridHelperService->prepareListingForGrid()
pimcore#5 vendor/pimcore/admin-ui-classic-bundle/src/Controller/Admin/DataObject/DataObjectController.php(1693): Pimcore\Bundle\AdminBundle\Controller\Admin\DataObject\DataObjectController->gridProxy()
pimcore#6 vendor/symfony/http-kernel/HttpKernel.php(181): Pimcore\Bundle\AdminBundle\Controller\Admin\DataObject\DataObjectController->gridProxyAction()
pimcore#7 vendor/symfony/http-kernel/HttpKernel.php(76): Symfony\Component\HttpKernel\HttpKernel->handleRaw()
pimcore#8 vendor/symfony/http-kernel/Kernel.php(197): Symfony\Component\HttpKernel\HttpKernel->handle()
pimcore#9 vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php(35): Symfony\Component\HttpKernel\Kernel->handle()
pimcore#10 vendor/autoload_runtime.php(29): Symfony\Component\Runtime\Runner\Symfony\HttpKernelRunner->run()
pimcore#11 public/index.php(19): require_once('...')
pimcore#12 {main}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant