class WeekDate

Same name in this branch
  1. 9 core/modules/datetime/src/Plugin/views/argument/WeekDate.php \Drupal\datetime\Plugin\views\argument\WeekDate
Same name and namespace in other branches
  1. 11.x core/modules/views/src/Plugin/views/argument/WeekDate.php \Drupal\views\Plugin\views\argument\WeekDate
  2. 11.x core/modules/datetime/src/Plugin/views/argument/WeekDate.php \Drupal\datetime\Plugin\views\argument\WeekDate

Argument handler for a week.

Plugin annotation

@ViewsArgument("date_week");

Hierarchy

Expanded class hierarchy of WeekDate

File

core/modules/views/src/Plugin/views/argument/WeekDate.php, line 10

Namespace

Drupal\views\Plugin\views\argument
View source
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', [
      '@week' => $created,
    ]);
  }

}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.