Projet

Général

Profil

Révision 5d12d676

Ajouté par Assos Assos il y a environ 6 ans

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/views/handlers/views_handler_field_custom.inc
11 11
 * @ingroup views_field_handlers
12 12
 */
13 13
class views_handler_field_custom extends views_handler_field {
14
  function query() {
15
    // do nothing -- to override the parent query.
14

  
15
  /**
16
   * {@inheritdoc}
17
   */
18
  public function query() {
19
    // Do nothing -- to override the parent query.
16 20
  }
17 21

  
18
  function option_definition() {
22
  /**
23
   * {@inheritdoc}
24
   */
25
  public function option_definition() {
19 26
    $options = parent::option_definition();
20 27

  
21 28
    // Override the alter text option to always alter the text.
......
24 31
    return $options;
25 32
  }
26 33

  
27
  function options_form(&$form, &$form_state) {
34
  /**
35
   * {@inheritdoc}
36
   */
37
  public function options_form(&$form, &$form_state) {
28 38
    parent::options_form($form, $form_state);
29 39

  
30
    // Remove the checkbox
40
    // Remove the checkbox.
31 41
    unset($form['alter']['alter_text']);
32 42
    unset($form['alter']['text']['#dependency']);
33 43
    unset($form['alter']['text']['#process']);
......
36 46
    $form['#pre_render'][] = 'views_handler_field_custom_pre_render_move_text';
37 47
  }
38 48

  
39
  function render($values) {
49
  /**
50
   * {@inheritdoc}
51
   */
52
  public function render($values) {
40 53
    // Return the text, so the code never thinks the value is empty.
41 54
    return $this->options['alter']['text'];
42 55
  }
56

  
43 57
}
44 58

  
45 59
/**

Formats disponibles : Unified diff