public function UtilityBase::getTypes in SimpleAds 8
Get Simpleads types.
1 call to UtilityBase::getTypes()
- UtilityBase::getName in src/
UtilityBase.php - Get ad type name by ID.
File
- src/
UtilityBase.php, line 39
Class
- UtilityBase
- Utility ads utility class.
Namespace
Drupal\simpleadsCode
public function getTypes() {
$types = [];
$manager = \Drupal::service($this->manager_name);
$plugins = $manager
->getDefinitions();
foreach ($plugins as $id => $plugin) {
$plugin = $manager
->createInstance($plugin['id']);
$types[$id] = $plugin
->getName();
}
return $types;
}