Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SmartCotnent ArticleDataProvider #6

Conversation

Prokyonn
Copy link

Q A
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Fixed tickets fixes #issuenum
Related issues/PRs #issuenum
License MIT
Documentation PR sulu/sulu-docs#prnum

What's in this PR?

Explain the contents of the PR.

Why?

Which problem does the PR fix? (remove this section if you linked an issue above)

Example Usage

// If you added new features, show examples of how to use them here
// (remove this section if not a new feature)

$foo = new Foo();

// Now we can do
$foo->doSomething();

BC Breaks/Deprecations

Describe BC breaks/deprecations here. (remove this section if not needed)

To Do

  • Create a documentation PR

} elseif ('created' === $field) {
$queryBuilder->addOrderBy('article.created', $order);
} elseif (\in_array($field, ['title', 'authored', 'workflowPublished'])) {
$this->joinDimensionContent($queryBuilder, 'article');

Choose a reason for hiding this comment

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

I would extend the addSortBys to dimensionContentQueryEnhancer.

@@ -260,4 +287,27 @@ private function createQueryBuilder(array $filters, array $sortBy = [], array $s

return $queryBuilder;
}

private function joinDimensionContent(QueryBuilder $queryBuilder, string $alias): void

Choose a reason for hiding this comment

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

we should move dimension based part to the dimensionContentQueryEnhancer service

@alexander-schranz alexander-schranz force-pushed the feature/content-article-repository branch from 77e1b9d to 1394d5f Compare August 8, 2024 08:46
@alexander-schranz alexander-schranz changed the title Draft: Add ArticleDataProvider Add SmartCotnent ArticleDataProvider Aug 8, 2024
@alexander-schranz alexander-schranz marked this pull request as ready for review August 8, 2024 09:01
@alexander-schranz alexander-schranz merged commit 2ad5c17 into alexander-schranz:feature/content-article-repository Aug 8, 2024
0 of 6 checks passed
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.

2 participants