You are here

public function ActivityGroupArgument::query in Open Social 8

Same name and namespace in other branches
  1. 8.9 modules/custom/activity_viewer/src/Plugin/views/argument/ActivityGroupArgument.php \Drupal\activity_viewer\Plugin\views\argument\ActivityGroupArgument::query()
  2. 8.2 modules/custom/activity_viewer/src/Plugin/views/argument/ActivityGroupArgument.php \Drupal\activity_viewer\Plugin\views\argument\ActivityGroupArgument::query()
  3. 8.3 modules/custom/activity_viewer/src/Plugin/views/argument/ActivityGroupArgument.php \Drupal\activity_viewer\Plugin\views\argument\ActivityGroupArgument::query()
  4. 8.4 modules/custom/activity_viewer/src/Plugin/views/argument/ActivityGroupArgument.php \Drupal\activity_viewer\Plugin\views\argument\ActivityGroupArgument::query()
  5. 8.5 modules/custom/activity_viewer/src/Plugin/views/argument/ActivityGroupArgument.php \Drupal\activity_viewer\Plugin\views\argument\ActivityGroupArgument::query()
  6. 8.6 modules/custom/activity_viewer/src/Plugin/views/argument/ActivityGroupArgument.php \Drupal\activity_viewer\Plugin\views\argument\ActivityGroupArgument::query()
  7. 8.7 modules/custom/activity_viewer/src/Plugin/views/argument/ActivityGroupArgument.php \Drupal\activity_viewer\Plugin\views\argument\ActivityGroupArgument::query()
  8. 8.8 modules/custom/activity_viewer/src/Plugin/views/argument/ActivityGroupArgument.php \Drupal\activity_viewer\Plugin\views\argument\ActivityGroupArgument::query()
  9. 10.3.x modules/custom/activity_viewer/src/Plugin/views/argument/ActivityGroupArgument.php \Drupal\activity_viewer\Plugin\views\argument\ActivityGroupArgument::query()
  10. 10.0.x modules/custom/activity_viewer/src/Plugin/views/argument/ActivityGroupArgument.php \Drupal\activity_viewer\Plugin\views\argument\ActivityGroupArgument::query()
  11. 10.1.x modules/custom/activity_viewer/src/Plugin/views/argument/ActivityGroupArgument.php \Drupal\activity_viewer\Plugin\views\argument\ActivityGroupArgument::query()
  12. 10.2.x modules/custom/activity_viewer/src/Plugin/views/argument/ActivityGroupArgument.php \Drupal\activity_viewer\Plugin\views\argument\ActivityGroupArgument::query()

Set up the query for this argument.

The argument sent may be found at $this->argument.

Overrides ArgumentPluginBase::query

File

modules/custom/activity_viewer/src/Plugin/views/argument/ActivityGroupArgument.php, line 21

Class

ActivityGroupArgument
Default implementation of the base argument plugin.

Namespace

Drupal\activity_viewer\Plugin\views\argument

Code

public function query($group_by = FALSE) {
  $this
    ->ensureMyTable();

  // \Drupal\views\Plugin\views\query\QueryPluginBase.
  $this->query
    ->addTable('activity__field_activity_recipient_group');
  $this->query
    ->addTable('activity__field_activity_entity');
  $this->query
    ->addTable('activity__field_activity_destinations');
  $or_condition = db_or();

  // Group is a recipient.
  $or_condition
    ->condition('activity__field_activity_recipient_group.field_activity_recipient_group_target_id', $this->argument, '=');
  $this->query
    ->addWhere('activity_group_argument', $or_condition);
}