final class Update310 in Lightning Media 8.4
Same name and namespace in other branches
- 8.3 src/Update/Update310.php \Drupal\lightning_media\Update\Update310
Contains optional updates targeting Lightning Media 3.1.0.
Plugin annotation
@Update("3.1.0");
Hierarchy
- class \Drupal\lightning_media\Update\Update310 implements ContainerInjectionInterface
Expanded class hierarchy of Update310
File
- src/
Update/ Update310.php, line 14
Namespace
Drupal\lightning_media\UpdateView source
final class Update310 implements ContainerInjectionInterface {
/**
* The module installer.
*
* @var \Drupal\Core\Extension\ModuleInstallerInterface
*/
protected $moduleInstaller;
/**
* Update310 constructor.
*
* @param \Drupal\Core\Extension\ModuleInstallerInterface $module_installer
* The module installer service.
*/
public function __construct(ModuleInstallerInterface $module_installer) {
$this->moduleInstaller = $module_installer;
}
/**
* {@inheritdoc}
*/
public static function create(ContainerInterface $container) {
return new static($container
->get('module_installer'));
}
/**
* Enables the Media Slideshow sub-component.
*
* @update
*
* @ask Do you want to add support for creating slideshows and carousels
* of media assets?
*/
public function enableMediaSlideshow() {
$this->moduleInstaller
->install([
'lightning_media_slideshow',
]);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
Update310:: |
protected | property | The module installer. | |
Update310:: |
public static | function |
Instantiates a new instance of this class. Overrides ContainerInjectionInterface:: |
|
Update310:: |
public | function | Enables the Media Slideshow sub-component. | |
Update310:: |
public | function | Update310 constructor. |