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/plugins/views_plugin_pager_some.inc
11 11
 * @ingroup views_pager_plugins
12 12
 */
13 13
class views_plugin_pager_some extends views_plugin_pager {
14
  function summary_title() {
14

  
15
  /**
16
   *
17
   */
18
  public function summary_title() {
15 19
    if (!empty($this->options['offset'])) {
16 20
      return format_plural($this->options['items_per_page'], '@count item, skip @skip', '@count items, skip @skip', array('@count' => $this->options['items_per_page'], '@skip' => $this->options['offset']));
17 21
    }
18
      return format_plural($this->options['items_per_page'], '@count item', '@count items', array('@count' => $this->options['items_per_page']));
22
    return format_plural($this->options['items_per_page'], '@count item', '@count items', array('@count' => $this->options['items_per_page']));
19 23
  }
20 24

  
21
  function option_definition() {
25
  /**
26
   * {@inheritdoc}
27
   */
28
  public function option_definition() {
22 29
    $options = parent::option_definition();
23 30
    $options['items_per_page'] = array('default' => 10);
24 31
    $options['offset'] = array('default' => 0);
......
29 36
  /**
30 37
   * Provide the default form for setting options.
31 38
   */
32
  function options_form(&$form, &$form_state) {
39
  public function options_form(&$form, &$form_state) {
33 40
    parent::options_form($form, $form_state);
34 41
    $pager_text = $this->display->handler->get_pager_text();
35 42
    $form['items_per_page'] = array(
......
47 54
    );
48 55
  }
49 56

  
50
  function use_pager() {
57
  /**
58
   * {@inheritdoc}
59
   */
60
  public function use_pager() {
51 61
    return FALSE;
52 62
  }
53 63

  
54
  function use_count_query() {
64
  /**
65
   * {@inheritdoc}
66
   */
67
  public function use_count_query() {
55 68
    return FALSE;
56 69
  }
57 70

  
58
  function query() {
71
  /**
72
   * {@inheritdoc}
73
   */
74
  public function query() {
59 75
    $this->view->query->set_limit($this->options['items_per_page']);
60 76
    $this->view->query->set_offset($this->options['offset']);
61 77
  }
78

  
62 79
}

Formats disponibles : Unified diff