/**
  * Loads any CP alerts.
  */
 public function actionGetCpAlerts()
 {
     $this->requireAjaxRequest();
     $path = craft()->request->getRequiredPost('path');
     // Fetch 'em and send 'em
     $alerts = CpHelper::getAlerts($path, true);
     $this->returnJson($alerts);
 }
Example #2
0
 /**
  * Returns an array of alerts to display in the CP.
  *
  * @return array
  */
 public function getAlerts()
 {
     return CpHelper::getAlerts(craft()->request->getPath());
 }