-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #38 from Soflomo/hotfix/view-helper
Add missing factory for blog article listing view helper
- Loading branch information
Showing
2 changed files
with
35 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?php | ||
/** | ||
* Copyright (c) 2013 Soflomo. | ||
* All rights reserved. | ||
* | ||
* This license allows for redistribution, commercial and non-commercial, as | ||
* long as it is passed along unchanged and in whole, with credit to Soflomo. | ||
* | ||
* @author Jurian Sluiman <jurian@soflomo.com> | ||
* @copyright 2013 Soflomo. | ||
* @license http://creativecommons.org/licenses/by-nd/3.0/ CC-BY-ND-3.0 | ||
* @link http://soflomo.com | ||
*/ | ||
|
||
namespace Soflomo\Blog\Factory; | ||
|
||
use Soflomo\Blog\View\Helper\BlogArticleListing; | ||
use Zend\ServiceManager\FactoryInterface; | ||
use Zend\ServiceManager\ServiceLocatorInterface; | ||
|
||
class BlogArticleListingFactory implements FactoryInterface | ||
{ | ||
public function createService(ServiceLocatorInterface $sl) | ||
{ | ||
$blogRepository = $sl->getServiceLocator()->get('Soflomo\Blog\Repository\Blog'); | ||
$articleRepository = $sl->getServiceLocator()->get('Soflomo\Blog\Repository\Article'); | ||
|
||
$helper = new BlogArticleListing($blogRepository, $articleRepository); | ||
return $helper; | ||
} | ||
} |