getExtension('chill_main') * ->addWidgetFactory(new PersonListWidgetFactory()); * } * } * ``` */ interface WidgetFactoryInterface { /** * configure options for the widget. Those options will be added in * configuration in the bundle where the widget will be used. * * @param type $place */ public function configureOptions($place, NodeBuilder $node); /** * Create a definition for the service which will render the widget. * * (Note: you can define the service by yourself, as other services, * using the `AbstractWidgetFactory`) * * @param type $place * @param type $order */ public function createDefinition(ContainerBuilder $containerBuilder, $place, $order, array $config); /** * return the service id to build the widget. * * @param string $place * @param float $order * * @return string the service definition */ public function getServiceId(ContainerBuilder $containerBuilder, $place, $order, array $config); /** * get the widget alias. This alias will be used in configuration (`config.yml`). */ public function getWidgetAlias(); }