S
S
Sergey Zolotarev2021-12-20 15:58:48
Yii
Sergey Zolotarev, 2021-12-20 15:58:48

Why are several components in configuration element subelements not being read by the framework?

Good evening!

To simplify the development time of the microarchitecture inside the site for the backend to work, I wanted to make sure that there were no troubles writing separate keys for interacting with app/components. Using this option , it still pisses me off why Yii does not work with the code in the config that I simplified. Why is this happening and how to solve it?

Code examples:

  • Problematic piece of config
  • Components I wrote
  • A piece of code with problematic connections


Thank you in advance!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Bay, 2021-12-20
@seregazolotaryow64

This is not how it should work.
'adminAPI' => you must have a component, and you are passing an array. With this, even below you have nonsense.
Read the component documentation.
1) you need AdminApiComponent
2) In it, specify public properties that, upon initialization, will contain the necessary APIs.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question