Projet

Général

Profil

Paste
Télécharger (735 octets) Statistiques
| Branche: | Révision:

root / drupal7 / sites / all / modules / feeds / views / feeds_views_handler_field_log_message.inc @ 651307cd

1
<?php
2

    
3
/**
4
 * @file
5
 * Contains feeds_views_handler_field_log_message.
6
 */
7

    
8
/**
9
 * Views handler for displaying a log message.
10
 */
11
class feeds_views_handler_field_log_message extends views_handler_field {
12

    
13
  /**
14
   * Override parent::render().
15
   */
16
  public function render($values) {
17
    $message = $values->{$this->field_alias};
18
    $variables = unserialize($values->{$this->aliases['variables']});
19

    
20
    // Messages that are too long may generate a PDO exception when calling t()
21
    // if Drupal tries to add them in {locales_source} table.
22
    return t(truncate_utf8($message, 65000, TRUE, TRUE), $variables);
23
  }
24

    
25
  /**
26
   * Disallow advanced rendering.
27
   */
28
  public function allow_advanced_render() {
29
    return FALSE;
30
  }
31

    
32
}