Commit 06caf69c authored by jaapjansma's avatar jaapjansma

Added OptionGroupByNameSpecification

parent b0ef93f4
......@@ -9,6 +9,7 @@ Version 1.2
* Refactor of the action provider, so that list of available actions only contains the title, name and not the instaciated class (with all the loaded configuration, such as groups, option values etc..)
* Create Address actions now also contains parameters for street name, housenumber and housenumber suffix
* Added OptionGroupByNameSpecification for parameter and configuration specification where the name of the option value is used rather than the value.
** New actions**
namespace Civi\ActionProvider\Parameter;
use CRM_ActionProvider_ExtensionUtil as E;
class OptionGroupByNameSpecification extends OptionGroupSpecification {
* @return array
public function getOptions() {
$options = array();
$optionsApi = civicrm_api3('OptionValue', 'get', array('option_group_id' => $this->option_group_id, 'options' => array('limit' => 0)));
foreach($optionsApi['values'] as $optionValue) {
$options[$optionValue['name']] = $optionValue['label'];
return $options;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment