@@ -236,6 +236,7 @@ protected function buildResultsSummary(ViewExecutable $view_executable) {
236236 * A renderable array representing the results per page portion of pager.
237237 */
238238 protected function buildResultsPerPageLinks (SqlBase $ pager , array $ query_parameters ) {
239+ $ config = $ this ->configFactory ->get (SettingsForm::CONFIG_NAME );
239240 $ active_items_per_page = $ query_parameters ['items_per_page ' ] ?? $ pager ->options ['items_per_page ' ];
240241 $ items_per_page_options = array_map (function ($ value ) {
241242 return trim ($ value );
@@ -252,7 +253,7 @@ protected function buildResultsPerPageLinks(SqlBase $pager, array $query_paramet
252253 'absolute ' => TRUE ,
253254 ]);
254255 $ active = $ items_per_page == $ active_items_per_page ;
255- $ items [] = [
256+ $ item = [
256257 '#type ' => 'link ' ,
257258 '#url ' => $ url ,
258259 '#title ' => $ items_per_page ,
@@ -267,6 +268,10 @@ protected function buildResultsPerPageLinks(SqlBase $pager, array $query_paramet
267268 'class ' => $ active ? ['pager__item ' , 'is-active ' ] : ['pager__item ' ],
268269 ],
269270 ];
271+ if (!empty ($ config ->get (SettingsForm::NO_FOLLOW ))) {
272+ $ item ['#attributes ' ]['rel ' ] = 'nofollow ' ;
273+ }
274+ $ items [] = $ item ;
270275 }
271276 return [
272277 '#theme ' => 'item_list ' ,
@@ -333,7 +338,7 @@ protected function buildDisplayLinks(array $query_parameters) {
333338 ]);
334339 $ text = "<i class='fa {$ options ['icon ' ]}' aria-hidden='true'> </i><span class='display-mode'> {$ options ['title ' ]}</span> " ;
335340 $ active = $ active_display == $ display ;
336- $ items [] = [
341+ $ item = [
337342 '#type ' => 'link ' ,
338343 '#url ' => $ url ,
339344 '#title ' => Markup::create ($ text ),
@@ -348,6 +353,10 @@ protected function buildDisplayLinks(array $query_parameters) {
348353 'class ' => $ active ? ['pager__item ' , 'is-active ' ] : ['pager__item ' ],
349354 ],
350355 ];
356+ if (!empty ($ config ->get (SettingsForm::NO_FOLLOW ))) {
357+ $ item ['#attributes ' ]['rel ' ] = 'nofollow ' ;
358+ }
359+ $ items [] = $ item ;
351360 }
352361
353362 if (count ($ items ) > 0 ) {
0 commit comments