You are here

private function crumbs_PluginSystem_PluginInfo::sortPluginMethods in Crumbs, the Breadcrumbs suite 7.2

Parameters

string[] $plugin_methods:

mixed[] $order:

Return value

array

2 calls to crumbs_PluginSystem_PluginInfo::sortPluginMethods()
crumbs_PluginSystem_PluginInfo::get_routelessPluginMethods in lib/PluginSystem/PluginInfo.php
crumbs_PluginSystem_PluginInfo::get_routePluginMethods in lib/PluginSystem/PluginInfo.php

File

lib/PluginSystem/PluginInfo.php, line 209

Class

crumbs_PluginSystem_PluginInfo
Info about available plugins and their weights.

Code

private function sortPluginMethods(array $plugin_methods, array $order) {
  $sorted = array();
  foreach ($order as $plugin_key => $x) {
    if (isset($plugin_methods[$plugin_key])) {
      $sorted[$plugin_key] = $plugin_methods[$plugin_key];
    }
  }
  return $sorted;
}