Skip to content

Doc for Quable#3085

Open
mnocon wants to merge 26 commits into5.0from
quable
Open

Doc for Quable#3085
mnocon wants to merge 26 commits into5.0from
quable

Conversation

@mnocon
Copy link
Copy Markdown
Contributor

@mnocon mnocon commented Mar 11, 2026

Documentation for the upcoming Quable connector.

Most important changes:

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 11, 2026

Preview of modified files

Preview of modified Markdown:

@mnocon mnocon changed the title [WIP] Doc for Quable Doc for Quable Mar 31, 2026
@mnocon mnocon marked this pull request as ready for review March 31, 2026 11:57
"ibexa/shopping-list": "~5.0.x-dev",
"ibexa/phpstan": "~5.0.-dev",
"ibexa/connector-quable": "5.0.x-dev",
"ibexa/quable-client": "dev-reverted-open-api as 5.0.x-dev",
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

TODO: switched to stable branch after release

hash = '#' + hash

if re.search("^https://[^@/]+.ibexa.co", path):
if re.search(r"^https?://", path):
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Relaxed the rules to be able to query other pages - in this case, quable.com

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Renamed

docs/pim/pim.md Outdated
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Renamed

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Apr 1, 2026

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 1, 2026

code_samples/ change report

Before (on target branch)After (in current PR)

code_samples/back_office/search/src/Query/ProductCategorySubtreeQuery.php


code_samples/back_office/search/src/Query/ProductCategorySubtreeQuery.php

docs/search/criteria_reference/productcategorysubtree_criterion.md@19:``` php
docs/search/criteria_reference/productcategorysubtree_criterion.md@20:[[= include_file('code_samples/back_office/search/src/Query/ProductCategorySubtreeQuery.php') =]]
docs/search/criteria_reference/productcategorysubtree_criterion.md@21:```

001⫶<?php declare(strict_types=1);
002⫶
003⫶use Ibexa\Contracts\ProductCatalog\Values\Product\ProductQuery;
004⫶use Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion\ProductCategorySubtree;
005⫶
006⫶$taxonomyEntryId = 42;
007⫶$criteria = new ProductCategorySubtree($taxonomyEntryId);
008⫶
009⫶/** @var \Ibexa\Contracts\ProductCatalog\ProductServiceInterface $productService */
010⫶$productQuery = new ProductQuery();
011⫶$productQuery->setQuery($criteria);
012⫶$results = $productService->findProducts($productQuery);


code_samples/back_office/search/src/Query/UpdatedAtQuery.php


code_samples/back_office/search/src/Query/UpdatedAtQuery.php

docs/search/criteria_reference/updated_at_criterion.md@28:``` php
docs/search/criteria_reference/updated_at_criterion.md@29:[[= include_file('code_samples/back_office/search/src/Query/UpdatedAtQuery.php') =]]
docs/search/criteria_reference/updated_at_criterion.md@30:```

001⫶<?php declare(strict_types=1);
002⫶
003⫶use DateTimeImmutable;
004⫶use Ibexa\Contracts\ProductCatalog\Values\Product\ProductQuery;
005⫶use Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion\Operator;
006⫶use Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion\UpdatedAt;
007⫶
008⫶$criteria = new UpdatedAt(
009⫶ new DateTimeImmutable('2023-03-01'),
010⫶ Operator::GTE,
011⫶);
012⫶
013⫶/** @var \Ibexa\Contracts\ProductCatalog\ProductServiceInterface $productService */
014⫶$productQuery = new ProductQuery();
015⫶$productQuery->setQuery($criteria);
016⫶$results = $productService->findProducts($productQuery);


code_samples/back_office/search/src/Query/UpdatedAtRangeQuery.php


code_samples/back_office/search/src/Query/UpdatedAtRangeQuery.php

docs/search/criteria_reference/updated_at_range_criterion.md@20:``` php
docs/search/criteria_reference/updated_at_range_criterion.md@21:[[= include_file('code_samples/back_office/search/src/Query/UpdatedAtRangeQuery.php') =]]
docs/search/criteria_reference/updated_at_range_criterion.md@22:```


code_samples/product_catalog/Symbol/Format/Checksum/LuhnChecksum.php
001⫶<?php declare(strict_types=1);
002⫶
003⫶use DateTimeImmutable;
004⫶use Ibexa\Contracts\ProductCatalog\Values\Product\ProductQuery;
005⫶use Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion\UpdatedAtRange;
006⫶
007⫶$criteria = new UpdatedAtRange(
008⫶ new DateTimeImmutable('2020-07-10T00:00:00+00:00'),
009⫶ new DateTimeImmutable('2023-07-12T00:00:00+00:00'),
010⫶);
011⫶
012⫶/** @var \Ibexa\Contracts\ProductCatalog\ProductServiceInterface $productService */
013⫶$productQuery = new ProductQuery();
014⫶$productQuery->setQuery($criteria);
015⫶$results = $productService->findProducts($productQuery);




code_samples/pim/Symbol/Format/Checksum/LuhnChecksum.php
code_samples/product_catalog/Symbol/Format/Checksum/LuhnChecksum.php


docs/pim/attributes/symbol_attribute_type.md@68:``` php
docs/pim/attributes/symbol_attribute_type.md@69:[[= include_file('code_samples/pim/Symbol/Format/Checksum/LuhnChecksum.php') =]]
docs/pim/attributes/symbol_attribute_type.md@70:```
docs/product_catalog/attributes/symbol_attribute_type.md@68:``` php
docs/product_catalog/attributes/symbol_attribute_type.md@69:[[= include_file('code_samples/product_catalog/Symbol/Format/Checksum/LuhnChecksum.php') =]]
docs/product_catalog/attributes/symbol_attribute_type.md@70:```

001⫶<?php
002⫶
003⫶declare(strict_types=1);
004⫶
005⫶namespace App\PIM\Symbol\Format\Checksum;
006⫶
007⫶use Ibexa\Contracts\ProductCatalog\Values\AttributeDefinitionInterface;
008⫶use Ibexa\Contracts\ProductCatalogSymbolAttribute\Value\ChecksumInterface;
009⫶
010⫶final class LuhnChecksum implements ChecksumInterface
011⫶{
012⫶ public function validate(AttributeDefinitionInterface $attributeDefinition, string $value): bool
013⫶ {
014⫶ $digits = $this->getDigits($value);
015⫶
016⫶ $count = count($digits);
017⫶ $total = 0;
018⫶ for ($i = $count - 2; $i >= 0; $i -= 2) {
019⫶ $digit = $digits[$i];
020⫶ if ($i % 2 === 0) {
021⫶ $digit *= 2;
022⫶ }
023⫶
024⫶ $total += $digit > 9 ? $digit - 9 : $digit;
025⫶ }
026⫶
027⫶ $checksum = $digits[$count - 1];
028⫶
029⫶ return $total + $checksum === 0;
030⫶ }
031⫶
032⫶ /**
033⫶ * Returns an array of digits from the given value (skipping any formatting characters).
034⫶ *
035⫶ * @return int[]
036⫶ */
037⫶ private function getDigits(string $value): array
038⫶ {
039⫶ $chars = array_filter(
040⫶ str_split($value),
041⫶ static fn (string $char): bool => $char !== '-'
042⫶ );
043⫶
044⫶ return array_map(intval(...), array_values($chars));
045⫶ }
046⫶}



001⫶<?php
002⫶
003⫶declare(strict_types=1);
004⫶
005⫶namespace App\PIM\Symbol\Format\Checksum;
006⫶
007⫶use Ibexa\Contracts\ProductCatalog\Values\AttributeDefinitionInterface;
008⫶use Ibexa\Contracts\ProductCatalogSymbolAttribute\Value\ChecksumInterface;
009⫶
010⫶final class LuhnChecksum implements ChecksumInterface
011⫶{
012⫶ public function validate(AttributeDefinitionInterface $attributeDefinition, string $value): bool
013⫶ {
014⫶ $digits = $this->getDigits($value);
015⫶
016⫶ $count = count($digits);
017⫶ $total = 0;
018⫶ for ($i = $count - 2; $i >= 0; $i -= 2) {
019⫶ $digit = $digits[$i];
020⫶ if ($i % 2 === 0) {
021⫶ $digit *= 2;
022⫶ }
023⫶
024⫶ $total += $digit > 9 ? $digit - 9 : $digit;
025⫶ }
026⫶
027⫶ $checksum = $digits[$count - 1];
028⫶
029⫶ return $total + $checksum === 0;
030⫶ }
031⫶
032⫶ /**
033⫶ * Returns an array of digits from the given value (skipping any formatting characters).
034⫶ *
035⫶ * @return int[]
036⫶ */
037⫶ private function getDigits(string $value): array
038⫶ {
039⫶ $chars = array_filter(
040⫶ str_split($value),
041⫶ static fn (string $char): bool => $char !== '-'
042⫶ );
043⫶
044⫶ return array_map(intval(...), array_values($chars));
045⫶ }
046⫶}


code_samples/pim/Symbol/Format/Checksum/LuhnChecksum.php


code_samples/product_catalog/src/EventSubscriber/MyAttributeRenderSubscriber.php

code_samples/product_catalog/src/EventSubscriber/MyAttributeRenderSubscriber.php

docs/product_catalog/customize_product_attribute_templates.md@90:``` php
docs/product_catalog/customize_product_attribute_templates.md@91:[[= include_file('code_samples/product_catalog/src/EventSubscriber/MyAttributeRenderSubscriber.php') =]]
docs/product_catalog/customize_product_attribute_templates.md@92:```

001⫶<?php declare(strict_types=1);
002⫶
003⫶namespace App\EventSubscriber;
004⫶
005⫶use Ibexa\Contracts\ProductCatalog\Events\ProductAttributeRenderEvent;
006⫶use Symfony\Component\EventDispatcher\Attribute\AsEventListener;
007⫶
008⫶final readonly class MyAttributeRenderSubscriber
009⫶{
010⫶ #[AsEventListener]
011⫶ public function onAttributeRender(ProductAttributeRenderEvent $event): void
012⫶ {
013⫶ $event->addTemplateBefore(
014⫶ 'templates/product/attributes/integer_attribute.html.twig',
015⫶ '@ibexadesign/product_catalog/product/attributes/attribute_blocks.html.twig',
016⫶ );
017⫶ }
018⫶}

Download colorized diff

@adriendupuis adriendupuis added the Wait with merge PRs that shouldn't be merged instantly label Apr 1, 2026
@adriendupuis adriendupuis mentioned this pull request Apr 1, 2026
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs DEV review Wait with merge PRs that shouldn't be merged instantly

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants