84 lines
2.4 KiB
Plaintext
84 lines
2.4 KiB
Plaintext
/**
|
|
* Registers the service provider with a DI container.
|
|
*
|
|
* @param Container $container The DI container.
|
|
*
|
|
* @return void
|
|
* @since 3.2.0
|
|
*/
|
|
public function register(Container $container)
|
|
{
|
|
$container->alias(CustomviewData::class, 'Customview.Data')
|
|
->share('Customview.Data', [$this, 'getCustomviewData'], true);
|
|
|
|
$container->alias(DynamicgetData::class, 'Dynamicget.Data')
|
|
->share('Dynamicget.Data', [$this, 'getDynamicgetData'], true);
|
|
|
|
$container->alias(DynamicgetSelection::class, 'Dynamicget.Selection')
|
|
->share('Dynamicget.Selection', [$this, 'getDynamicgetSelection'], true);
|
|
}
|
|
|
|
/**
|
|
* Get the Compiler Customview Data
|
|
*
|
|
* @param Container $container The DI container.
|
|
*
|
|
* @return CustomviewData
|
|
* @since 3.2.0
|
|
*/
|
|
public function getCustomviewData(Container $container): CustomviewData
|
|
{
|
|
return new CustomviewData(
|
|
$container->get('Config'),
|
|
$container->get('Event'),
|
|
$container->get('Customcode'),
|
|
$container->get('Customcode.Gui'),
|
|
$container->get('Model.Libraries'),
|
|
$container->get('Templatelayout.Data'),
|
|
$container->get('Dynamicget.Data'),
|
|
$container->get('Model.Loader'),
|
|
$container->get('Model.Javascriptcustomview'),
|
|
$container->get('Model.Csscustomview'),
|
|
$container->get('Model.Phpcustomview'),
|
|
$container->get('Model.Ajaxcustomview'),
|
|
$container->get('Model.Custombuttons')
|
|
);
|
|
}
|
|
|
|
/**
|
|
* Get the Compiler Dynamicget Data
|
|
*
|
|
* @param Container $container The DI container.
|
|
*
|
|
* @return DynamicgetData
|
|
* @since 3.2.0
|
|
*/
|
|
public function getDynamicgetData(Container $container): DynamicgetData
|
|
{
|
|
return new DynamicgetData(
|
|
$container->get('Config'),
|
|
$container->get('Registry'),
|
|
$container->get('Event'),
|
|
$container->get('Customcode'),
|
|
$container->get('Customcode.Dispenser'),
|
|
$container->get('Customcode.Gui'),
|
|
$container->get('Model.Dynamicget')
|
|
);
|
|
}
|
|
|
|
/**
|
|
* Get the Compiler Dynamicget Selection
|
|
*
|
|
* @param Container $container The DI container.
|
|
*
|
|
* @return DynamicgetSelection
|
|
* @since 3.2.0
|
|
*/
|
|
public function getDynamicgetSelection(Container $container): DynamicgetSelection
|
|
{
|
|
return new DynamicgetSelection(
|
|
$container->get('Config'),
|
|
$container->get('Compiler.Builder.Get.As.Lookup'),
|
|
$container->get('Compiler.Builder.Site.Fields')
|
|
);
|
|
} |