Mercurial > hg > cmmr2012-drupal-site
comparison core/modules/views_ui/src/ViewUI.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 | 12f9dff5fda9 |
comparison
equal
deleted
inserted
replaced
3:307d7a7fd348 | 4:a9cd425dd02b |
---|---|
49 * | 49 * |
50 * If this view is locked it will contain the result of | 50 * If this view is locked it will contain the result of |
51 * \Drupal\Core\TempStore\SharedTempStore::getMetadata(). Which can be a stdClass or | 51 * \Drupal\Core\TempStore\SharedTempStore::getMetadata(). Which can be a stdClass or |
52 * NULL. | 52 * NULL. |
53 * | 53 * |
54 * @var stdClass | 54 * @var object |
55 */ | 55 */ |
56 public $lock; | 56 public $lock; |
57 | 57 |
58 /** | 58 /** |
59 * If this view has been changed. | 59 * If this view has been changed. |
711 ], | 711 ], |
712 [ | 712 [ |
713 'data' => [ | 713 'data' => [ |
714 '#markup' => $path, | 714 '#markup' => $path, |
715 ], | 715 ], |
716 ] | 716 ], |
717 ]; | 717 ]; |
718 } | 718 } |
719 if ($show_stats) { | 719 if ($show_stats) { |
720 $rows['statistics'][] = [ | 720 $rows['statistics'][] = [ |
721 [ | 721 [ |
788 } | 788 } |
789 } | 789 } |
790 else { | 790 else { |
791 foreach ($errors as $display_errors) { | 791 foreach ($errors as $display_errors) { |
792 foreach ($display_errors as $error) { | 792 foreach ($display_errors as $error) { |
793 drupal_set_message($error, 'error'); | 793 \Drupal::messenger()->addError($error); |
794 } | 794 } |
795 } | 795 } |
796 $preview = ['#markup' => t('Unable to preview due to validation errors.')]; | 796 $preview = ['#markup' => t('Unable to preview due to validation errors.')]; |
797 } | 797 } |
798 | 798 |
857 /** | 857 /** |
858 * Sets a cached view object in the shared tempstore. | 858 * Sets a cached view object in the shared tempstore. |
859 */ | 859 */ |
860 public function cacheSet() { | 860 public function cacheSet() { |
861 if ($this->isLocked()) { | 861 if ($this->isLocked()) { |
862 drupal_set_message(t('Changes cannot be made to a locked view.'), 'error'); | 862 \Drupal::messenger()->addError(t('Changes cannot be made to a locked view.')); |
863 return; | 863 return; |
864 } | 864 } |
865 | 865 |
866 // Let any future object know that this view has changed. | 866 // Let any future object know that this view has changed. |
867 $this->changed = TRUE; | 867 $this->changed = TRUE; |