What are the Slack Archives?
Itβs a history of our time together in the Slack Community! Thereβs a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.
Because this space is not active, you wonβt be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..
I am creating a form following
I am creating a form following https://documentation.spryker.com/docs/en/t-working-forms#create-the-formtype, getting the below error Call to undefined method getFormFactory()
Comments
-
Can anyone suggest where I am going wrong
0 -
Does your factory extends
Spryker\Yves\Kernel\AbstractFactory
?If it does, are you sure your factory receives the dependency?
/** * @return \Symfony\Component\Form\FormFactoryInterface */ public function getFormFactory(): FormFactoryInterface { return $this->getProvidedDependency(ApplicationConstants::FORM_FACTORY); }
If all this works, take a look at the
Spryker\Yves\Form\Plugin\Application\FormApplicationPlugin
and if it is added toPyz\Yves\Application\ApplicationDependencyProvider::getApplicationPlugins()
0 -
when factory is receiving dependency it is throwing Spryker\Yves\Kernel\ClassResolver\DependencyProvider\DependencyProviderNotFoundException
0 -
If all this works, take a look at theΒ
Spryker\Yves\Form\Plugin\Application\FormApplicationPlugin
Β and if it is added toΒPyz\Yves\Application\ApplicationDependencyProvider::getApplicationPlugins()
0 -
it is not added, Let me add and check
0 -
<?php declare(strict_types = 1); /** * This file is part of the Spryker Commerce OS. * For full license information, please view the LICENSE file that was distributed with this source code. */ namespace Pyz\Yves\Form; use Pyz\Yves\Application\ApplicationDependencyProvider as SprykerApplicationDependencyProvider; class ApplicationDependencyProvider extends SprykerApplicationDependencyProvider { /** * @return \Spryker\Shared\ApplicationExtension\Dependency\Plugin\ApplicationPluginInterface[] */ protected function getApplicationPlugins(): array { $plugins = [ new FormApplicationPlugin(), ]; return $plugins; } }
0 -
Is it correct?
0 -
hi
0 -
sorry, could only jump in now
0 -
Hi Marco
0 -
the above is surely not correct. since you add an ApplicationDependencyProvider from the Application Module to the Form namespace
0 -
but let me read the whole thread first π
0 -
also, these questions surely do not belong in , rather in if there is no channel available that is more specific
0 -
You need to add it to
Pyz\Yves\Application\ApplicationDependencyProvider
and there in thegetApplicationPlugins()
.0 -
@UJN2JRU4F let me know where do I need to add this
0 -
well, first guess: where @UL6DGRULR suggested β
0 -
As suggested, have added to Pyz\Yves\Application\ApplicationDependencyProvider
0 -
And does it work?
0 -
no it is not
0 -
well, the thing is called ShopApplicationDependencyProvider
0 -
you mean I need to extend ShopApplicationDependecyProvider?
0 -
think the original suggestion was to make sure it is there
0 -
you probably do not need to extend anything
0 -
i think yu need to share significantly more code
0 -
Everything that is related to the above error message
0 -
the controller, the factory, the dependency provider
0 -
these things should be provided by default when you request help here. this will allow people to speed up the assistance process π
0 -
β you can still do that, btw π
0 -
Sorry for delay, here are the controller, factory and dependency provider files
0 -
could please also add the latest error message?
0
Categories
- All Categories
- 42 Getting Started & Guidelines
- 7 Getting Started in the Community
- 8 Additional Resources
- 7 Community Ideas and Feedback
- 75 Spryker News
- 924 Developer Corner
- 783 Spryker Development
- 88 Spryker Dev Environment
- 362 Spryker Releases
- 3 Oryx frontend framework
- 35 Propel ORM
- 68 Community Projects
- 3 Community Ideation Board
- 30 Hackathon
- 3 PHP Bridge
- 6 Gacela Project
- 25 Job Opportunities
- 3.2K π Slack Archives
- 116 Academy
- 5 Business Users
- 370 Docker
- 551 Slack General
- 2K Help
- 75 Knowledge Sharing
- 6 Random Stuff
- 4 Code Testing
- 32 Product & Business Questions
- 70 Spryker Safari Questions
- 50 Random