-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Moves _everything_ to factories (except some things that require duplication in the `Education` and `User` module).
- Loading branch information
Showing
215 changed files
with
4,526 additions
and
1,658 deletions.
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
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
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
24 changes: 24 additions & 0 deletions
24
module/Activity/src/Command/Factory/CalendarNotifyFactory.php
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,24 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Activity\Command\Factory; | ||
|
||
use Activity\Command\CalendarNotify; | ||
use Activity\Service\ActivityCalendar as ActivityCalendarService; | ||
use Laminas\ServiceManager\Factory\FactoryInterface; | ||
use Psr\Container\ContainerInterface; | ||
|
||
class CalendarNotifyFactory implements FactoryInterface | ||
{ | ||
/** | ||
* @param string $requestedName | ||
*/ | ||
public function __invoke( | ||
ContainerInterface $container, | ||
$requestedName, | ||
?array $options = null, | ||
): CalendarNotify { | ||
return new CalendarNotify($container->get(ActivityCalendarService::class)); | ||
} | ||
} |
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
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
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
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
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
28 changes: 28 additions & 0 deletions
28
module/Activity/src/Form/Factory/ActivityCalendarOptionFactory.php
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,28 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Activity\Form\Factory; | ||
|
||
use Activity\Form\ActivityCalendarOption as ActivityCalendarOptionForm; | ||
use Activity\Service\ActivityCalendarForm as ActivityCalendarFormService; | ||
use Laminas\Mvc\I18n\Translator as MvcTranslator; | ||
use Laminas\ServiceManager\Factory\FactoryInterface; | ||
use Psr\Container\ContainerInterface; | ||
|
||
class ActivityCalendarOptionFactory implements FactoryInterface | ||
{ | ||
/** | ||
* @param string $requestedName | ||
*/ | ||
public function __invoke( | ||
ContainerInterface $container, | ||
$requestedName, | ||
?array $options = null, | ||
): ActivityCalendarOptionForm { | ||
return new ActivityCalendarOptionForm( | ||
$container->get(MvcTranslator::class), | ||
$container->get(ActivityCalendarFormService::class), | ||
); | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
module/Activity/src/Form/Factory/ActivityCalendarPeriodFactory.php
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,24 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Activity\Form\Factory; | ||
|
||
use Activity\Form\ActivityCalendarPeriod as ActivityCalendarPeriodForm; | ||
use Laminas\Mvc\I18n\Translator as MvcTranslator; | ||
use Laminas\ServiceManager\Factory\FactoryInterface; | ||
use Psr\Container\ContainerInterface; | ||
|
||
class ActivityCalendarPeriodFactory implements FactoryInterface | ||
{ | ||
/** | ||
* @param string $requestedName | ||
*/ | ||
public function __invoke( | ||
ContainerInterface $container, | ||
$requestedName, | ||
?array $options = null, | ||
): ActivityCalendarPeriodForm { | ||
return new ActivityCalendarPeriodForm($container->get(MvcTranslator::class)); | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
module/Activity/src/Form/Factory/ActivityCalendarProposalFactory.php
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,30 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Activity\Form\Factory; | ||
|
||
use Activity\Form\ActivityCalendarProposal as ActivityCalendarProposalForm; | ||
use Activity\Service\AclService; | ||
use Activity\Service\ActivityCalendarForm as ActivityCalendarFormService; | ||
use Laminas\Mvc\I18n\Translator as MvcTranslator; | ||
use Laminas\ServiceManager\Factory\FactoryInterface; | ||
use Psr\Container\ContainerInterface; | ||
|
||
class ActivityCalendarProposalFactory implements FactoryInterface | ||
{ | ||
/** | ||
* @param string $requestedName | ||
*/ | ||
public function __invoke( | ||
ContainerInterface $container, | ||
$requestedName, | ||
?array $options = null, | ||
): ActivityCalendarProposalForm { | ||
return new ActivityCalendarProposalForm( | ||
$container->get(MvcTranslator::class), | ||
$container->get(ActivityCalendarFormService::class), | ||
$container->get(AclService::class)->isAllowed('create_always', 'activity'), | ||
); | ||
} | ||
} |
Oops, something went wrong.