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/modules/comment/views_handler_field_comment_link_edit.inc
11 11
 * @ingroup views_field_handlers
12 12
 */
13 13
class views_handler_field_comment_link_edit extends views_handler_field_comment_link {
14
  function option_definition() {
14

  
15
  /**
16
   * {@inheritdoc}
17
   */
18
  public function option_definition() {
15 19
    $options = parent::option_definition();
16 20
    $options['destination'] = array('default' => FALSE, 'bool' => TRUE);
17 21

  
18 22
    return $options;
19 23
  }
20 24

  
21
  function options_form(&$form, &$form_state) {
25
  /**
26
   * {@inheritdoc}
27
   */
28
  public function options_form(&$form, &$form_state) {
22 29
    parent::options_form($form, $form_state);
23 30

  
24 31
    $form['destination'] = array(
......
30 37
    );
31 38
  }
32 39

  
33
  function render_link($data, $values) {
40
  /**
41
   * {@inheritdoc}
42
   */
43
  public function render_link($data, $values) {
34 44
    parent::render_link($data, $values);
35
    // ensure user has access to edit this comment.
45
    // Ensure user has access to edit this comment.
36 46
    $comment = $this->get_value($values);
37 47
    if (!comment_access('edit', $comment)) {
38 48
      return;
......
49 59

  
50 60
    return $text;
51 61
  }
62

  
52 63
}

Formats disponibles : Unified diff