SproutCMS

This is the code documentation for the SproutCMS project

class Notification

Provides user event notification functions

Source code (42 results)

/modules/HarborAndSprout/Controllers/HarborController.php   Highlighted file source

Line 10: use Sprout\Helpers\Notification;
Line 92: Notification::error(sprintf('Authentication error: %s', $_GET['error']));
Line 94: Notification::confirm('Connected');

/modules/Welcome/Controllers/WelcomeController.php   Highlighted file source

Line 32: use Sprout\Helpers\Notification;
Line 458: Notification::error('Please configure Database - Step 1 of checklist.');
Line 561: Notification::error('Please configure Database - Step 1 of checklist. It\'s required for validation!');
Line 576: Notification::error('Password does not meet complexity requirements:');
Line 578: Notification::error(" \xC2\xA0 \xC2\xA0 " . $c);
Line 634: Notification::error('Please configure Database - Step 1 of checklist.');
Line 640: Notification::error('This site already has content');
Line 648: Notification::confirm('Sample content has been added');

/skin/default/home.php   Highlighted file source

Line 5: use Sprout\Helpers\Notification;
Line 58: <?php echo Notification::checkMessages(); ?>

/skin/default/inner.php   Highlighted file source

Line 6: use Sprout\Helpers\Notification;
Line 68: <?php echo Notification::checkMessages(); ?>

/skin/default/wide.php   Highlighted file source

Line 6: use Sprout\Helpers\Notification;
Line 64: <?php echo Notification::checkMessages(); ?>

/skin/harbor/home.php   Highlighted file source

Line 5: use Sprout\Helpers\Notification;

/skin/harbor/inner.php   Highlighted file source

Line 6: use Sprout\Helpers\Notification;
Line 44: <?= Notification::checkMessages(); ?>

/sprout/Controllers/Admin/CategoryAdminController.php   Highlighted file source

Line 26: use Sprout\Helpers\Notification;
Line 173: $valid->createNotifications();
Line 247: Notification::error('Unable to edit category');
Line 260: $valid->createNotifications();
Line 336: Notification::error('Unable to delete category');
Line 440: Notification::error('Access denied');
Line 457: Notification::confirm('Re-order was successful');
Line 499: Notification::error('Access denied');
Line 514: Notification::confirm('Category re-order was successful');

/sprout/Controllers/Admin/CronJobAdminController.php   Highlighted file source

Line 20: use Sprout\Helpers\Notification;
Line 139: Notification::error('You must select a cron job');
Line 155: Notification::error('Specified cron job is not registered');

/sprout/Controllers/Admin/FileAdminController.php   Highlighted file source

Line 40: use Sprout\Helpers\Notification;
Line 711: Notification::error('Image may be missing from server');
Line 781: Notification::error('Error with upload of replacement; you will need to re-select your file');
Line 788: Notification::error('Error with file upload; you will need to re-select your file');
Line 795: $valid->createNotifications();
Line 808: Notification::error('File upload failed');
Line 827: Notification::confirm('New file uploaded successfully');
Line 881: Notification::confirm('Image was manipulated successfully');
Line 1199: Notification::error('Database error performing cleanup');
Line 1203: Notification::confirm('Cleanup was successful');
Line 1511: Notification::error('Unable to create worker job');

/sprout/Controllers/Admin/HasCategoriesAdminController.php   Highlighted file source

Line 30: use Sprout\Helpers\Notification;
Line 836: Notification::error('No items selected for categorisation');
Line 879: Notification::error('Access denied');
Line 884: Notification::error('No items selected for categorisation');
Line 889: Notification::error('No categories specified for addition');
Line 900: Notification::error('Database error');
Line 919: Notification::confirm('Categorisation was successful');

/sprout/Controllers/Admin/ListAdminController.php   Highlighted file source

Line 20: use Sprout\Helpers\Notification;
Line 154: Notification::confirm('Re-order was successful');

/sprout/Controllers/Admin/ManagedAdminController.php   Highlighted file source

Line 34: use Sprout\Helpers\Notification;
Line 597: Notification::error ('No column mappings defined');
Line 615: Notification::error ('Field used for duplicate matching does not have a column mapping defined');
Line 622: $valid->createNotifications();
Line 1796: Notification::error('No items selected for deletion');
Line 1816: Notification::error('Access denied');
Line 1821: Notification::error('No items selected for deletion');
Line 1844: Notification::confirm('Deletion of ' . $success . ' ' . Inflector::singular($this->getFriendlyName(), $success) . ' was successful');
Line 1847: Notification::error($constraint . ' ' . Inflector::singular($this->getFriendlyName(), $constraint) . " in use by other modules and can't be deleted");

/sprout/Controllers/Admin/MySettingsAdminController.php   Highlighted file source

Line 21: use Sprout\Helpers\Notification;
Line 103: Notification::error('Password does not meet complexity requirements:');
Line 105: Notification::error(" \xC2\xA0 \xC2\xA0 " . $c);
Line 130: Notification::confirm('Settings have been saved');
Line 183: Notification::error('Verifiction failed - please re-scan and try again');
Line 193: Notification::confirm('Two factor auth has been enabled');
Line 208: Notification::confirm('Two factor auth has been disabled');

/sprout/Controllers/Admin/OperatorAdminController.php   Highlighted file source

Line 23: use Sprout\Helpers\Notification;
Line 207: Notification::error('Password does not meet complexity requirements:');
Line 209: Notification::error(" \xC2\xA0 \xC2\xA0 " . $c);
Line 216: Notification::error('You must choose at least one category');
Line 222: Notification::error('You do not have access to manage category id ' . $cat_id);
Line 285: Notification::error('This operator is in a category you do not have permission to manage - category id ' . $cat_id);
Line 325: $valid->createNotifications();
Line 337: Notification::error('Password does not meet complexity requirements:');
Line 339: Notification::error(" \xC2\xA0 \xC2\xA0 " . $c);
Line 346: Notification::error('You must choose at least one category');
Line 352: Notification::error('You do not have access to manage category id ' . $cat_id);

/sprout/Controllers/Admin/PageAdminController.php   Highlighted file source

Line 51: use Sprout\Helpers\Notification;
Line 332: $valid->createNotifications();
Line 442: Notification::confirm('Your page has been created. Add your content below.');
Line 533: Notification::error($err->message . ' (' . $err->code . ') at ' . $err->line . ':' . $err->column);
Line 561: Notification::error($error);
Line 776: Notification::confirm('Imported ' . $count . ' ' . Inflector::plural('page', $count));
Line 1512: $valid->createNotifications();
Line 1645: // Notification
Line 1649: Notification::confirm('Your new revision has been saved, and is pending approval');
Line 1650: Notification::confirm('Now showing current live revision');
Line 1655: Notification::confirm($msg);
Line 1656: Notification::confirm('Now showing current live revision');
Line 1659: Notification::confirm('Your changes have been saved and are now live');
Line 1662: Notification::confirm('Your changes have been saved');
Line 1741: Notification::confirm("An email has been sent to {$approval_operator['name']}");
Line 1744: // A notification to all operators
Line 1766: if (!$res) Notification::error('Failed to index page text');
Line 1771: if (empty($this->in_preview)) Notification::confirm('Page type has been changed.');
Line 1883: Notification::confirm('Your changes have been saved');
Line 2528: Notification::error("Invalid 'send_to' argument");
Line 2533: Notification::error("You didn't enter an email address");
Line 2544: Notification::error("Unable to start background process: {$ex->getMessage()}");
Line 2548: Notification::confirm("Background process started");
Line 2738: Notification::confirm('Page cache has been cleared');

/sprout/Controllers/Admin/PerRecordPermissionAdminController.php   Highlighted file source

Line 26: use Sprout\Helpers\Notification;
Line 181: Notification::confirm('Configuration updated');
Line 242: Notification::error('No tab specified');
Line 250: Notification::error('Invalid tab specified');
Line 268: Notification::confirm($msg);

/sprout/Controllers/Admin/SubsiteAdminController.php   Highlighted file source

Line 18: use Sprout\Helpers\Notification;
Line 67: $valid->createNotifications();
Line 213: Notification::error('You cannot delete the only subsite in the system; must have at least one subsite at all times');

/sprout/Controllers/Admin/TreeAdminController.php   Highlighted file source

Line 23: use Sprout\Helpers\Notification;
Line 308: Notification::error('Access denied');
Line 327: Notification::confirm('Re-order was successful');
Line 380: Notification::error('Failed to read submitted change data');
Line 423: Notification::confirm('Your changes have been saved');

/sprout/Controllers/Admin/WorkerJobAdminController.php   Highlighted file source

Line 22: use Sprout\Helpers\Notification;
Line 126: Notification::error('You must provide a valid class name');
Line 133: Notification::error('Unable to parse arguments JSON');

/sprout/Controllers/AdminController.php   Highlighted file source

Line 45: use Sprout\Helpers\Notification;
Line 190: Notification::error("Username or password not specified.");
Line 198: Notification::error('Login rate limit exceeded.');
Line 199: Notification::error("Limit: {$aspect}, {$limit}");
Line 216: Notification::error('Incorrect username or password specified');
Line 292: Notification::error('Two-factor authentication failed - please try again');
Line 314: Notification::error('No subsites are accessible by your user account');
Line 322: Notification::error('Your user account isn\'t in any categories.');
Line 329: Notification::confirm('You are now logged in to the admin control panel');
Line 353: Notification::confirm('You are now logged out');
Line 591: Notification::error('There was an error performing the export');
Line 696: Notification::error($error);
Line 775: Notification::error('There was an error performing the import');
Line 783: Notification::confirm('Import has been completed successfully');
Line 839: Notification::error('Access Denied; Section: ' . $ctlr->getFriendlyName() . '; Action: ' . $access_flag);
Line 1202: Notification::error('There was an error saving your changes');
Line 1214: Notification::error('There was an error updating the tags for this item');
Line 1224: if (!Notification::has(Notification::TYPE_CONFIRM)) {
Line 1225: Notification::confirm($message, []);
Line 1385: Notification::error('There was an error saving your changes');
Line 1399: Notification::error('There was an error updating the tags for this item');
Line 1405: if (!Notification::has(Notification::TYPE_CONFIRM)) {
Line 1406: Notification::confirm('Your changes have been saved');
Line 1502: Notification::error($ex->getMessage());
Line 1511: Notification::error("This {$item_name} is in use and can't be deleted");
Line 1526: Notification::error('There was a database error deleting the specified item');
Line 1532: Notification::confirm('Deletion was successful');
Line 1727: Notification::error('There was an error saving your changes');
Line 1736: Notification::error('There was an error updating the tags for this item');
Line 1742: Notification::confirm('Your changes have been saved');
Line 1851: if ($approve) Notification::confirm('Approved ' . $approve . ' record' . ($approve != 1 ? 's.' : '.'));
Line 1852: if ($delete) Notification::confirm('Deleted ' . $delete . ' record' . ($delete != 1 ? 's.' : '.'));
Line 1978: Notification::error('Access denied');
Line 1984: Notification::confirm('Subsite changed');
Line 2178: Notification::error('Database error during restore');
Line 2187: Notification::confirm('Data has been restored');

/sprout/Controllers/ContentSubscribeController.php   Highlighted file source

Line 24: use Sprout\Helpers\Notification;
Line 63: Notification::error('Invalid id or unsubscription code');
Line 120: Notification::error('Invalid id or unsubscription code');
Line 126: Notification::error('You didn\'t select anything');
Line 144: Notification::confirm('You have been unsubscribed');

/sprout/Controllers/Controller.php   Highlighted file source

Line 507: $validator->createNotifications();

/sprout/Controllers/DbToolsController.php   Highlighted file source

Line 55: use Sprout\Helpers\Notification;
Line 143: Notification::error('Access denied');
Line 658: Notification::error(sprintf('Failed to execute %u %s. Scroll down for results', $failures, Inflector::singular('queries', $failures)));
Line 662: Notification::confirm(sprintf('Executed %u %s. Scroll down for results', $successes, Inflector::singular('queries', $successes)));
Line 1262: Notification::error('There was an error uploading your file, please try again.');
Line 1267: Notification::error('Invalid file type; only .zip files are supported.');
Line 2892: Notification::error('Please select a sub-site');
Line 2899: Notification::error('Invalid file type');
Line 2910: Notification::error('Unable to copy file to temporary directory');

/sprout/Controllers/EmailShareController.php   Highlighted file source

Line 24: use Sprout\Helpers\Notification;
Line 103: Notification::error('No URL to share');
Line 172: $valid->createNotifications();
Line 193: Notification::confirm('Message sent');
Line 206: Notification::error('The URL you provided appears invalid');

/sprout/Controllers/MultiStepFormController.php   Highlighted file source

Line 21: use Sprout\Helpers\Notification;
Line 227: $valid->createNotifications();
Line 264: Notification::error('A database error occurred. Please contact us to resolve the issue.');

/sprout/Controllers/PageController.php   Highlighted file source

Line 30: use Sprout\Helpers\Notification;
Line 501: Notification::error('Unknown action');
Line 506: Notification::error('Invalid approval code');
Line 519: Notification::error('Invalid revision or approval code');
Line 524: Notification::confirm('Revision is already live');
Line 527: Notification::error('Revision is not awaiting approval');
Line 555: Notification::confirm('Revision is now live');
Line 578: Notification::confirm('Revision has been rejected');

/sprout/Controllers/ResultController.php   Highlighted file source

Line 26: * Generic page for displaying one or more error messages set via {@see Notification::error}
Line 40: * Generic page for displaying one or more success messages set via {@see Notification::confirm}

/sprout/core/Bootstrap.php   Highlighted file source

Line 25: use Sprout\Helpers\Notification;
Line 71: Notification::error('Welcome-Module not enabled! Enable it via <a href="http://docs.getsproutcms.com/installation">config file</a>.', 'html');
Line 72: Notification::confirm('Or please log in to admin area using the form below.');

/sprout/Helpers/AdminAuth.php   Highlighted file source

Line 48: if ($redirect && $redirect !== "admin") Notification::error('You need to be logged in to access this part of the site');

/sprout/Helpers/Csrf.php   Highlighted file source

Line 79: Notification::error('Session timeout or missing security token');

/sprout/Helpers/ImportCMS.php   Highlighted file source

Line 9: use Sprout\Helpers\Notification;

/sprout/Helpers/Notification.php   Highlighted file source

Line 18: * Provides user event notification functions
Line 20: class Notification
Line 35: * Renders notification messages for display to the user
Line 67: // Ignore popups at this point and render out regular notifications
Line 71: $out .= "<span class=\"notification--text\">{$message[1]}</span>";
Line 76: $out .= "<span class=\"notification--action\"><a href=\"{$action}\">{$anchor}</a></span>";
Line 89: // If we still have notifications they must be pop-ups - render them
Line 91: $popup = '<div id="notification-box">';
Line 92: $popup .= '<div id="notification-box-content">';
Line 93: $popup .= '<h2 class="notification-box-msg">' . Enc::html($message[1]) . '</h2>';
Line 95: $popup .= '<div id="notification-box-links">';
Line 119: * Checks to see if a notification of a particular type has been set
Line 120: * @param int $type One of the Notification::TYPE_* constants
Line 121: * @param string $scope System to allow for multiple notification areas
Line 122: * @return bool True if a notification has been set
Line 141: * @param string $scope System to allow for multiple notification areas
Line 159: * @param string $scope System to allow for multiple notification areas
Line 177: * @param string $scope System to allow for multiple notification areas

/sprout/Helpers/Spam.php   Highlighted file source

Line 57: * with a notification. Normal users will never encounter this scenario.
Line 65: Notification::error('Are you a spam bot?');

/sprout/Helpers/SproutVariable.php   Highlighted file source

Line 40: public $notification;
Line 57: $this->notification = new Notification();

/sprout/Helpers/Validator.php   Highlighted file source

Line 36: * $valid->createNotifications();
Line 50: * $valid->createNotifications();
Line 76: * $multi_valid->createNotifications();
Line 463: * Create notification error messages for each error
Line 465: * @param string $scope Set the scope for the notifications
Line 467: public function createNotifications($scope = 'default')
Line 470: Notification::error($msg, 'plain', $scope);
Line 475: Notification::error($this->labels[$field] . ' -- ' . implode(', ', $msg), 'plain', $scope);
Line 478: Notification::error($label . ' -- ' . implode(', ', $msg), 'plain', $scope);

/sprout/views/admin/login_layout.php   Highlighted file source

Line 19: use Sprout\Helpers\Notification;
Line 106: <?= Notification::checkMessages(); ?>

/sprout/views/admin/main_layout.php   Highlighted file source

Line 22: use Sprout\Helpers\Notification;
Line 271: <?php echo Notification::checkMessages(); ?>

/sprout/Widgets/VideoPlaylistWidget.php   Highlighted file source

Line 22: use Sprout\Helpers\Notification;
Line 99: Notification::error('Unable to determine YouTube playlist from given URL');
Line 105: Notification::error('Please configure your Google API key for YouTube videos');
Line 126: Notification::error('Unable to connect to YouTube API');
Line 133: Notification::error('Unable to decode data from YouTube API');
Line 139: Notification::error('YouTube API error: ' . $playlist->error->code . ' ' . $playlist->error->message);

A total of 238 lines in 42 files were found