function crumbs_example_CrumbsMonoPlugin_NewsByDate::findTitle__news_x_x in Crumbs, the Breadcrumbs suite 7
Same name and namespace in other branches
- 7.2 example/lib/CrumbsMonoPlugin/NewsByDate.php \crumbs_example_CrumbsMonoPlugin_NewsByDate::findTitle__news_x_x()
This one only makes sense if you created a view with path "news/%/%"
File
- example/lib/ CrumbsMonoPlugin/ NewsByDate.php, line 20 
Class
Code
function findTitle__news_x_x($path, $item) {
  // Title will be the month. But we want the human-readable version!
  list(, $year, $month) = $item['map'];
  // Pick the middle of the month,
  // so we don't have to think about time zones and rounding.
  $unixtime = strtotime("{$year}-{$month}-15");
  // Return full month name as the title.
  return t(date('F', $unixtime));
}