You are here

WeekDate.php in Zircon Profile 8

Same filename and directory in other branches
  1. 8.0 core/modules/views/src/Plugin/views/argument/WeekDate.php

File

core/modules/views/src/Plugin/views/argument/WeekDate.php
View source
<?php

/**
 * @file
 * Contains \Drupal\views\Plugin\views\argument\WeekDate.
 */
namespace Drupal\views\Plugin\views\argument;


/**
 * Argument handler for a week.
 *
 * @ViewsArgument("date_week")
 */
class WeekDate extends Date {

  /**
   * {@inheritdoc}
   */
  protected $argFormat = 'W';

  /**
   * Provide a link to the next level of the view
   */
  public function summaryName($data) {
    $created = $data->{$this->name_alias};
    return $this
      ->t('Week @week', array(
      '@week' => $created,
    ));
  }

}

Classes

Namesort descending Description
WeekDate Argument handler for a week.