function pm_project_filter

8.0.x pm_project_filter($update_info, $security_only)
6.x pm_project_filter($update_info, $security_only)
7.x pm_project_filter($update_info, $security_only)
3.x pm_project_filter(&$projects, &$rows)
4.x pm_project_filter(&$update_info, &$rows, $security_only)
5.x pm_project_filter(&$update_info, &$rows, $security_only)
master pm_project_filter($update_info, $security_only)

Filter projects based on verbosity level and $security_only flag.


array $update_info: Update info for projects.

bool $security_only: Whether to select only projects with security updates.

Return value

Array of projects matching filter criteria.

1 call to pm_project_filter()
drush_pm_updatestatus in commands/pm/
Command callback. Displays update status info of installed projects.


commands/pm/, line 208
pm-updatestatus command implementation.


function pm_project_filter($update_info, $security_only) {
  $eligible = array();
  foreach ($update_info as $key => $project) {
    if ($security_only) {
      if ($project['status'] == DRUSH_UPDATESTATUS_NOT_SECURE) {
        $eligible[$key] = $project;
    elseif (drush_get_context('DRUSH_VERBOSE')) {
      $eligible[$key] = $project;
    elseif ($project['status'] != DRUSH_UPDATESTATUS_CURRENT) {
      $eligible[$key] = $project;
  return $eligible;