public function SectionAssociation::getCurrentUserIds in Workbench Access 8
Returns an array of currently assigned user ids for the section.
Return value
array A positional array of user ids.
Overrides SectionAssociationInterface::getCurrentUserIds
File
- src/
Entity/ SectionAssociation.php, line 118
Class
- SectionAssociation
- Defines the workbench_access SectionAssociation class.
Namespace
Drupal\workbench_access\EntityCode
public function getCurrentUserIds() {
$user_ids = [];
if ($values = $this
->get('user_id')) {
foreach ($values as $delta => $value) {
$target = $value
->getValue();
$user_ids[] = $target['target_id'];
}
}
return $user_ids;
}