You are here

public function ActivityDestinationManager::getListByProperties in Open Social 8.7

Same name and namespace in other branches
  1. 8.9 modules/custom/activity_creator/src/Plugin/ActivityDestinationManager.php \Drupal\activity_creator\Plugin\ActivityDestinationManager::getListByProperties()
  2. 8 modules/custom/activity_creator/src/Plugin/ActivityDestinationManager.php \Drupal\activity_creator\Plugin\ActivityDestinationManager::getListByProperties()
  3. 8.2 modules/custom/activity_creator/src/Plugin/ActivityDestinationManager.php \Drupal\activity_creator\Plugin\ActivityDestinationManager::getListByProperties()
  4. 8.3 modules/custom/activity_creator/src/Plugin/ActivityDestinationManager.php \Drupal\activity_creator\Plugin\ActivityDestinationManager::getListByProperties()
  5. 8.4 modules/custom/activity_creator/src/Plugin/ActivityDestinationManager.php \Drupal\activity_creator\Plugin\ActivityDestinationManager::getListByProperties()
  6. 8.5 modules/custom/activity_creator/src/Plugin/ActivityDestinationManager.php \Drupal\activity_creator\Plugin\ActivityDestinationManager::getListByProperties()
  7. 8.6 modules/custom/activity_creator/src/Plugin/ActivityDestinationManager.php \Drupal\activity_creator\Plugin\ActivityDestinationManager::getListByProperties()
  8. 8.8 modules/custom/activity_creator/src/Plugin/ActivityDestinationManager.php \Drupal\activity_creator\Plugin\ActivityDestinationManager::getListByProperties()
  9. 10.3.x modules/custom/activity_creator/src/Plugin/ActivityDestinationManager.php \Drupal\activity_creator\Plugin\ActivityDestinationManager::getListByProperties()
  10. 10.0.x modules/custom/activity_creator/src/Plugin/ActivityDestinationManager.php \Drupal\activity_creator\Plugin\ActivityDestinationManager::getListByProperties()
  11. 10.1.x modules/custom/activity_creator/src/Plugin/ActivityDestinationManager.php \Drupal\activity_creator\Plugin\ActivityDestinationManager::getListByProperties()
  12. 10.2.x modules/custom/activity_creator/src/Plugin/ActivityDestinationManager.php \Drupal\activity_creator\Plugin\ActivityDestinationManager::getListByProperties()

Retrieves an list of available destinations by given properties.

Parameters

string $condition: The property to filter on.

bool $value: Value.

Return value

string[] An array of the IDs of all available destination plugins.

File

modules/custom/activity_creator/src/Plugin/ActivityDestinationManager.php, line 59

Class

ActivityDestinationManager
Provides the Activity destination plugin manager.

Namespace

Drupal\activity_creator\Plugin

Code

public function getListByProperties($condition = NULL, $value = NULL) {
  $options = [];
  foreach ($this
    ->getDefinitions() as $plugin_id => $plugin_definition) {
    if (empty($condition) || isset($plugin_definition[$condition]) && $plugin_definition[$condition] === $value) {
      $options[] = $plugin_id;
    }
  }
  return $options;
}