public function RulesCertificateMapper::getMapKeys in Certificate 4.x
Get a list of map keys.
Return value
array
Overrides CertificateMapperBase::getMapKeys
File
- src/
Plugin/ certificate/ CertificateMapper/ RulesCertificateMapper.php, line 24
Class
- RulesCertificateMapper
- Plugin annotation @CertificateMapper( id = "rules", label = @Translation("Rules component"), description = @Translation("Uses rules components"), required = {"rules"} )
Namespace
Drupal\certificate\Plugin\certificate\CertificateMapperCode
public function getMapKeys() {
$options = [];
$credit_types = Drupal::entityTypeManager()
->getStorage('rules_reaction_rule')
->loadMultiple();
foreach ($credit_types as $key => $type) {
$options[$key] = $type
->label();
}
return $options;
}