Skip to content
Next
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Minds Backend - Engine
Project
Project
Details
Activity
Releases
Dependency List
Cycle Analytics
Insights
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
174
Issues
174
List
Boards
Labels
Service Desk
Milestones
Merge Requests
43
Merge Requests
43
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
List
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Minds
Minds Backend - Engine
Commits
9ca3cbb4
Commit
9ca3cbb4
authored
1 day ago
by
Emiliano Balbuena
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(fix): Circular DI issue on Entities\Resolver
parent
7fb97f93
goal/boost-campaigns-e24
1 merge request
!235
WIP: Boost Campaigns (&24)
Pipeline
#71975138
passed with stages
in 8 minutes and 34 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
9 deletions
+6
-9
BoostCampaignResolverDelegate.php
Core/Entities/Delegates/BoostCampaignResolverDelegate.php
+6
-9
No files found.
Core/Entities/Delegates/BoostCampaignResolverDelegate.php
View file @
9ca3cbb4
...
...
@@ -15,21 +15,15 @@ use Minds\Core\Entities\Resolver;
class
BoostCampaignResolverDelegate
implements
ResolverDelegate
{
/** @var Manager */
protected
$manager
;
/** @var Resolver */
protected
$resolver
;
/**
* BoostCampaignResolverDelegate constructor.
* @param Manager $manager
*/
public
function
__construct
(
$manager
=
null
)
public
function
__construct
()
{
$this
->
manager
=
$manager
?:
Di
::
_
()
->
get
(
'Boost\Campaigns\Manager'
);
// NOTE: Campaigns\Manager is injected dynamically because of circular dependency issues
}
/**
...
...
@@ -59,11 +53,14 @@ class BoostCampaignResolverDelegate implements ResolverDelegate
*/
public
function
resolve
(
array
$urns
,
array
$opts
=
[])
{
/** @var Manager $manager */
$manager
=
Di
::
_
()
->
get
(
'Boost\Campaigns\Manager'
);
$entities
=
[];
foreach
(
$urns
as
$urn
)
{
/** @var Campaign $boost */
$boost
=
$
this
->
manager
->
get
(
$urn
);
$boost
=
$manager
->
get
(
$urn
);
$entities
[]
=
$boost
;
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment