D
D
dkrylov2017-05-05 19:07:47
Yii
dkrylov, 2017-05-05 19:07:47

How to preserve the meaning of the concept of a module when connecting a third-party widget?

Hello, dear yii's ;)
In the continuation of the study of this wonderful framework, I had a question.
I'm creating a Galery module and in this module I want to use a third party widget. But getting it through composer and including it in a module, I have a feeling that the concept of a module is a bit lost.
My inner voice, which read the documentation:

The module must be self-contained

How to do it right? I suspect what to connect in the module itself by creating the "widgets" folder, but how to install the composer in this case in it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Timofeev, 2017-05-07
@dkrylov

All yii is built on dependencies.
There are many composer.json files. One for the project, specify your module in the dependencies, the second composer.json for your module, it contains dependencies for it, its dependencies may contain a widget that has its own composer.json and dependencies from other projects. This is the meaning of composer

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question