You are here

function _patterns_section_fail in Patterns 7.2

Outputs information about an un-successful execution of a section of a pattern

Parameters

mixed $pid The pid of the pattern:

mixed $pattern_title The title of the pattern:

mixed $section The title of the section executed:

mixed $msg Optional. An additional message to be displayed:

2 calls to _patterns_section_fail()
patterns_batch_finish in includes/core/batch.inc
Finishes a batch operation.
patterns_execute_pattern_php in includes/core/php.inc
Execute a Pattern. Actions will be called sequentially.

File

includes/core/common.inc, line 344
The common functions used by the Batch and PHP running modes.

Code

function _patterns_section_fail($pid, $pattern_title, $section, $msg = NULL) {
  $params = array(
    '@pattern' => $pattern_title,
    '@section' => $section,
  );
  drupal_set_message(t('Section "@section" of pattern "@pattern" ran with errors. Check the error messages to get more details.', $params), 'warning');
  if (!empty($msg)) {
    drupal_set_message($msg, 'error');
  }
}