public function DemoContentManager::createInstances in Open Social 8.8
Same name and namespace in other branches
- 8.9 modules/custom/social_demo/src/DemoContentManager.php \Drupal\social_demo\DemoContentManager::createInstances()
- 8 modules/custom/social_demo/src/DemoContentManager.php \Drupal\social_demo\DemoContentManager::createInstances()
- 8.2 modules/custom/social_demo/src/DemoContentManager.php \Drupal\social_demo\DemoContentManager::createInstances()
- 8.3 modules/custom/social_demo/src/DemoContentManager.php \Drupal\social_demo\DemoContentManager::createInstances()
- 8.4 modules/custom/social_demo/src/DemoContentManager.php \Drupal\social_demo\DemoContentManager::createInstances()
- 8.5 modules/custom/social_demo/src/DemoContentManager.php \Drupal\social_demo\DemoContentManager::createInstances()
- 8.6 modules/custom/social_demo/src/DemoContentManager.php \Drupal\social_demo\DemoContentManager::createInstances()
- 8.7 modules/custom/social_demo/src/DemoContentManager.php \Drupal\social_demo\DemoContentManager::createInstances()
- 10.3.x modules/custom/social_demo/src/DemoContentManager.php \Drupal\social_demo\DemoContentManager::createInstances()
- 10.0.x modules/custom/social_demo/src/DemoContentManager.php \Drupal\social_demo\DemoContentManager::createInstances()
- 10.1.x modules/custom/social_demo/src/DemoContentManager.php \Drupal\social_demo\DemoContentManager::createInstances()
- 10.2.x modules/custom/social_demo/src/DemoContentManager.php \Drupal\social_demo\DemoContentManager::createInstances()
Create multiple instances.
Parameters
array $plugin_ids: Identifiers of plugins.
array $configurations: Array with configuration for all plugins.
Return value
array Array with instances of the plugins.
File
- modules/
custom/ social_demo/ src/ DemoContentManager.php, line 53
Class
- DemoContentManager
- Class DemoContentManager.
Namespace
Drupal\social_demoCode
public function createInstances(array $plugin_ids, array $configurations = []) {
$instances = [];
foreach ($plugin_ids as $plugin_id) {
$configuration = isset($configurations[$plugin_id]) ? $configurations[$plugin_id] : [];
$instances[$plugin_id] = static::createInstance($plugin_id, $configuration);
}
return $instances;
}