public static function ViewsAddButtonUser::generateUrl in Views Add Button 8
Same name and namespace in other branches
- 2.0.x src/Plugin/views_add_button/ViewsAddButtonUser.php \Drupal\views_add_button\Plugin\views_add_button\ViewsAddButtonUser::generateUrl()
Generate the add button URL.
Parameters
string $entity_type: Entity type ID.
string $bundle: Bundle ID.
array $options: Array of options to be passed to the Url object.
string $context: Module-specific context string.
Return value
\Drupal\Core\Url Url object which is used to construct the add button link
File
- src/
Plugin/ views_add_button/ ViewsAddButtonUser.php, line 63
Class
- ViewsAddButtonUser
- User plugin for Views Add Button.
Namespace
Drupal\views_add_button\Plugin\views_add_buttonCode
public static function generateUrl($entity_type, $bundle, array $options, $context = '') {
// Create URL from the data above.
$url = Url::fromRoute('user.admin_create', [], $options);
return $url;
}