Created
August 31, 2017 11:44
-
-
Save suresh-kumara-gist/739849ea7b6fb9c0fc925d1f59ae04ad to your computer and use it in GitHub Desktop.
generating html link and for views route
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
use Drupal\Core\Url; | |
use Drupal\Core\Render\Markup; | |
$options = [ | |
'attributes' => [ | |
'class' => [ | |
'use-ajax', | |
], | |
'data-dialog-type' => "modal", | |
'data-dialog-options' => [ | |
'{"dialogClass":"course-reviews"}', | |
], | |
], | |
]; | |
$url = Url::fromRoute('view.read_course_reviews.page_1', [ | |
'arg_0' => $groupId | |
], $options ); | |
$viewreviews = \Drupal::service('link_generator')->generate($text, $url); | |
Markup::create($viewreviews->__toString()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment