Created
December 5, 2019 08:10
-
-
Save init90/81f601f3b300a0b982ca7742b828117d to your computer and use it in GitHub Desktop.
Get group from views contextual filter argument.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$group = NULL; | |
foreach ($view->argument as $arg) { | |
if ($arg->getPluginId() !== 'group_id') { | |
continue; | |
} | |
$group = Group::load($arg->getValue()); | |
break; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment