-
Notifications
You must be signed in to change notification settings - Fork 80
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
Implemented twig methods sulu_article_load_recent
sulu_article_load_similar
#193
Implemented twig methods sulu_article_load_recent
sulu_article_load_similar
#193
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
functionality is good
use Sulu\Bundle\ArticleBundle\Document\ArticleViewDocumentInterface; | ||
use Sulu\Component\DocumentManager\DocumentManagerInterface; | ||
|
||
class ArticleResourceItemFactory |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
phpdoc also on classes and interfaces
* | ||
* @return ArticleResourceItem | ||
*/ | ||
public function getResourceItem(ArticleViewDocumentInterface $articleViewDocument) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use createResurceItem
- factory creates items
@@ -86,6 +86,17 @@ public function getConfigTreeBuilder() | |||
->end() | |||
->end() | |||
->scalarNode('display_tab_all')->defaultTrue()->info("Display tab 'all' in list view")->end() | |||
->arrayNode('search_fields') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
update config:dump in installation.md
use Sulu\Bundle\ArticleBundle\Metadata\ArticleViewDocumentIdTrait; | ||
use Sulu\Component\DocumentManager\DocumentManagerInterface; | ||
|
||
class ArticleViewDocumentRepository |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
phpdoc
} | ||
|
||
/** | ||
* @param int $limit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
always add a description for function
$search->addQuery(new TermQuery('uuid', $excludeUuid), BoolQuery::MUST_NOT); | ||
} | ||
|
||
$search->addSort(new FieldSort('published')); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm in my opinion should be authored
* | ||
* @return DocumentIterator | ||
*/ | ||
public function findRecent($excludeUuid = null, $limit, array $types = null, $locale) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
provide a default for limit
What's in this PR?
Implemented twig methods
sulu_article_load_recent
sulu_article_load_similar
andArticleViewDocumentRepository
.