1. Home
  2. Docs
  3. Developers
  4. Develop custom packages
  5. Components

Components

If you are defining components in your package there are two methods specified by a \Convo\Core\Factory\IComponentSource interface that you have to provide: getComponentDefinition() and createPackageComponent().

First off, after having written your component, register it in the protected _initDefinitions() method by initializing the _definitions to an array of \Convo\Core\Factory\ComponentDefinition. Provide the namespace, class name, component name, description, and properties.

Next you must implement the methods defined in the above mentioned interface. For a general use case scenario, the method definition provided in the CorePackageDefinition will do just fine. You may, of course, override these methods to cover an edge case if the need arises.

Was this article helpful to you? Yes No

How can we help?