You are here

function _classified_drush_get_action_stats in Classified Ads 7.3

Same name and namespace in other branches
  1. 6.3 classified.drush.inc \_classified_drush_get_action_stats()

Utility function to build a dt() parameters array about nodes.

Parameters

array $nodes: Keyed by uid, and containing the nids and titles of purged nodes.

Return value

array A dt() parameters array

3 calls to _classified_drush_get_action_stats()
drush_classified_expire in ./classified.drush.inc
Command callback for classified-expire. No output: nothing to return.
drush_classified_notify in ./classified.drush.inc
Command callback for classified-notify. No output: nothing to return.
drush_classified_purge in ./classified.drush.inc
Command callback for classified-purge. No output: nothing to return.

File

./classified.drush.inc, line 23
Drush 8 plugin for classified.module.

Code

function _classified_drush_get_action_stats(array $nodes) {
  $user_count = count($nodes);
  $node_count = 0;
  foreach ($nodes as $user_nodes) {
    $node_count += count($user_nodes);
  }
  $ret = array(
    '@node_count' => $node_count,
    '@user_count' => $user_count,
  );
  return $ret;
}