Skip to content

Commit 8f17286

Browse files
committed
add changelog notice and cleanup phpdoc
1 parent fe6fb84 commit 8f17286

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
Changelog
22
=========
33

4+
1.4.0
5+
-----
6+
7+
* **2016-02-27**: Added ContentRepositoryEnhancer that can look up a content by
8+
ID from a content repository.
9+
410
1.4.0-RC1
511
---------
612

Enhancer/ContentRepositoryEnhancer.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,18 @@
1616
use Symfony\Component\HttpFoundation\Request;
1717

1818
/**
19-
* This enhancer sets the content to target field if the route has content id.
19+
* This enhancer uses a ContentRepositoryInterface to load a content if $target
20+
* is empty.
2021
*
21-
* Works with ContentRepositoryInterface that you can search the content.
22+
* $source specifies the field that contains the ID to load, $target specifies
23+
* the field where to put the content returned by the repository.
2224
*
2325
* @author Samusev Andrey
2426
*/
2527
class ContentRepositoryEnhancer implements RouteEnhancerInterface
2628
{
2729
/**
28-
* @var Repository
30+
* @var ContentRepositoryInterface
2931
*/
3032
private $contentRepository;
3133

@@ -42,7 +44,7 @@ class ContentRepositoryEnhancer implements RouteEnhancerInterface
4244
/**
4345
* @param ContentRepositoryInterface $contentRepository repository to search for the content
4446
* @param string $target the field name to set content
45-
* @param string $source the field name of the content id
47+
* @param string $source the field name of the request parameter that contains the id
4648
*/
4749
public function __construct(
4850
ContentRepositoryInterface $contentRepository,

0 commit comments

Comments
 (0)