class GroupByNumeric
Same name in this branch
- 9 core/modules/views/src/Plugin/views/sort/GroupByNumeric.php \Drupal\views\Plugin\views\sort\GroupByNumeric
- 9 core/modules/views/src/Plugin/views/filter/GroupByNumeric.php \Drupal\views\Plugin\views\filter\GroupByNumeric
Same name and namespace in other branches
- 11.x core/modules/views/src/Plugin/views/sort/GroupByNumeric.php \Drupal\views\Plugin\views\sort\GroupByNumeric
- 11.x core/modules/views/src/Plugin/views/filter/GroupByNumeric.php \Drupal\views\Plugin\views\filter\GroupByNumeric
- 11.x core/modules/views/src/Plugin/views/argument/GroupByNumeric.php \Drupal\views\Plugin\views\argument\GroupByNumeric
Simple handler for arguments using group by.
Plugin annotation
@ViewsArgument("groupby_numeric");
Hierarchy
- class \Drupal\Component\Plugin\PluginBase extends \Drupal\Component\Plugin\PluginInspectionInterface, \Drupal\Component\Plugin\DerivativeInspectionInterface
- class \Drupal\Core\Plugin\PluginBase uses \Drupal\Core\StringTranslation\StringTranslationTrait, \Drupal\Core\DependencyInjection\DependencySerializationTrait, \Drupal\Core\Messenger\MessengerTrait implements \Drupal\Component\Plugin\PluginBase
- class \Drupal\views\Plugin\views\PluginBase extends \Drupal\Core\Plugin\ContainerFactoryPluginInterface, \Drupal\views\Plugin\views\ViewsPluginInterface, \Drupal\Component\Plugin\DependentPluginInterface, \Drupal\Core\Security\TrustedCallbackInterface implements \Drupal\Core\Plugin\PluginBase
- class \Drupal\views\Plugin\views\HandlerBase extends \Drupal\views\Plugin\views\ViewsHandlerInterface implements \Drupal\views\Plugin\views\PluginBase
- class \Drupal\views\Plugin\views\argument\ArgumentPluginBase extends \Drupal\Core\Cache\CacheableDependencyInterface implements \Drupal\views\Plugin\views\HandlerBase
- class \Drupal\views\Plugin\views\argument\GroupByNumeric implements \Drupal\views\Plugin\views\argument\ArgumentPluginBase
- class \Drupal\views\Plugin\views\argument\ArgumentPluginBase extends \Drupal\Core\Cache\CacheableDependencyInterface implements \Drupal\views\Plugin\views\HandlerBase
- class \Drupal\views\Plugin\views\HandlerBase extends \Drupal\views\Plugin\views\ViewsHandlerInterface implements \Drupal\views\Plugin\views\PluginBase
- class \Drupal\views\Plugin\views\PluginBase extends \Drupal\Core\Plugin\ContainerFactoryPluginInterface, \Drupal\views\Plugin\views\ViewsPluginInterface, \Drupal\Component\Plugin\DependentPluginInterface, \Drupal\Core\Security\TrustedCallbackInterface implements \Drupal\Core\Plugin\PluginBase
- class \Drupal\Core\Plugin\PluginBase uses \Drupal\Core\StringTranslation\StringTranslationTrait, \Drupal\Core\DependencyInjection\DependencySerializationTrait, \Drupal\Core\Messenger\MessengerTrait implements \Drupal\Component\Plugin\PluginBase
Expanded class hierarchy of GroupByNumeric
Related topics
File
-
core/
modules/ views/ src/ Plugin/ views/ argument/ GroupByNumeric.php, line 12
Namespace
Drupal\views\Plugin\views\argumentView source
class GroupByNumeric extends ArgumentPluginBase {
public function query($group_by = FALSE) {
$this->ensureMyTable();
$field = $this->getField();
$placeholder = $this->placeholder();
$this->query
->addHavingExpression(0, "{$field} = {$placeholder}", [
$placeholder => $this->argument,
]);
}
public function adminLabel($short = FALSE) {
return $this->getField(parent::adminLabel($short));
}
/**
* {@inheritdoc}
*/
public function getSortName() {
return $this->t('Numerical', [], [
'context' => 'Sort order',
]);
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.