Mercurial > hg > cmmr2012-drupal-site
comparison core/modules/views/views.api.php @ 4:a9cd425dd02b
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:11:55 +0000 |
parents | c75dbcec494b |
children |
comparison
equal
deleted
inserted
replaced
3:307d7a7fd348 | 4:a9cd425dd02b |
---|---|
769 // (This action could be performed later in the execution process, but not | 769 // (This action could be performed later in the execution process, but not |
770 // earlier.) | 770 // earlier.) |
771 $account = \Drupal::currentUser(); | 771 $account = \Drupal::currentUser(); |
772 | 772 |
773 if (count($view->query->tables) > 2 && $account->hasPermission('administer views')) { | 773 if (count($view->query->tables) > 2 && $account->hasPermission('administer views')) { |
774 drupal_set_message(t('The view %view may be heavy to execute.', ['%view' => $view->id()]), 'warning'); | 774 \Drupal::messenger()->addWarning(t('The view %view may be heavy to execute.', ['%view' => $view->id()])); |
775 } | 775 } |
776 } | 776 } |
777 | 777 |
778 /** | 778 /** |
779 * Act on the view immediately after the query has been executed. | 779 * Act on the view immediately after the query has been executed. |
793 // If there are more than 100 results, show a message that encourages the user | 793 // If there are more than 100 results, show a message that encourages the user |
794 // to change the filter settings. | 794 // to change the filter settings. |
795 // (This action could be performed later in the execution process, but not | 795 // (This action could be performed later in the execution process, but not |
796 // earlier.) | 796 // earlier.) |
797 if ($view->total_rows > 100) { | 797 if ($view->total_rows > 100) { |
798 drupal_set_message(t('You have more than 100 hits. Use the filter settings to narrow down your list.')); | 798 \Drupal::messenger()->addStatus(t('You have more than 100 hits. Use the filter settings to narrow down your list.')); |
799 } | 799 } |
800 } | 800 } |
801 | 801 |
802 /** | 802 /** |
803 * Act on the view immediately before rendering it. | 803 * Act on the view immediately before rendering it. |