Révision c304a780
Ajouté par Assos Assos il y a environ 6 ans
drupal7/sites/all/modules/ctools/views_content/plugins/views/views_content_plugin_display_panel_pane.inc | ||
---|---|---|
8 | 8 |
* If this variable is true, this display counts as a panel pane. We use |
9 | 9 |
* this variable so that other modules can create alternate pane displays. |
10 | 10 |
*/ |
11 |
var $panel_pane_display = TRUE;
|
|
12 |
var $has_pane_conf = NULL;
|
|
11 |
public $panel_pane_display = TRUE;
|
|
12 |
public $has_pane_conf = NULL;
|
|
13 | 13 |
|
14 |
function option_definition() { |
|
14 |
|
|
15 |
public function option_definition() { |
|
15 | 16 |
$options = parent::option_definition(); |
16 | 17 |
|
17 | 18 |
$options['pane_title'] = array('default' => '', 'translatable' => TRUE); |
... | ... | |
34 | 35 |
'title_override' => array('default' => FALSE), |
35 | 36 |
'exposed_form' => array('default' => FALSE), |
36 | 37 |
'fields_override' => array('default' => FALSE), |
37 |
),
|
|
38 |
), |
|
38 | 39 |
); |
39 | 40 |
|
40 | 41 |
$options['argument_input'] = array('default' => array()); |
... | ... | |
44 | 45 |
return $options; |
45 | 46 |
} |
46 | 47 |
|
47 |
function has_pane_conf() { |
|
48 |
|
|
49 |
public function has_pane_conf() { |
|
48 | 50 |
return isset($this->has_pane_conf); |
49 | 51 |
} |
50 | 52 |
|
51 |
function set_pane_conf($conf = array()) { |
|
53 |
|
|
54 |
public function set_pane_conf($conf = array()) { |
|
52 | 55 |
$this->set_option('pane_conf', $conf); |
53 | 56 |
$this->has_pane_conf = TRUE; |
54 | 57 |
} |
... | ... | |
58 | 61 |
* |
59 | 62 |
* This output is returned as an array. |
60 | 63 |
*/ |
61 |
function options_summary(&$categories, &$options) { |
|
64 |
public function options_summary(&$categories, &$options) {
|
|
62 | 65 |
// It is very important to call the parent function here: |
63 | 66 |
parent::options_summary($categories, $options); |
64 | 67 |
|
... | ... | |
147 | 150 |
/** |
148 | 151 |
* Provide the default form for setting options. |
149 | 152 |
*/ |
150 |
function options_form(&$form, &$form_state) { |
|
153 |
public function options_form(&$form, &$form_state) {
|
|
151 | 154 |
// It is very important to call the parent function here: |
152 | 155 |
parent::options_form($form, $form_state); |
153 | 156 |
|
... | ... | |
177 | 180 |
'#options' => $options, |
178 | 181 |
); |
179 | 182 |
break; |
183 |
|
|
180 | 184 |
case 'pane_title': |
181 | 185 |
$form['#title'] .= t('Administrative title'); |
182 | 186 |
|
... | ... | |
318 | 322 |
* Perform any necessary changes to the form values prior to storage. |
319 | 323 |
* There is no need for this function to actually store the data. |
320 | 324 |
*/ |
321 |
function options_submit(&$form, &$form_state) { |
|
325 |
public function options_submit(&$form, &$form_state) {
|
|
322 | 326 |
// It is very important to call the parent function here: |
323 | 327 |
parent::options_submit($form, $form_state); |
324 | 328 |
switch ($form_state['section']) { |
... | ... | |
340 | 344 |
* the arguments doesn't cause the argument input field to just |
341 | 345 |
* break. |
342 | 346 |
*/ |
343 |
function get_argument_input() { |
|
347 |
public function get_argument_input() {
|
|
344 | 348 |
$arguments = $this->get_option('argument_input'); |
345 | 349 |
$handlers = $this->get_handlers('argument'); |
346 | 350 |
|
... | ... | |
368 | 372 |
return $output; |
369 | 373 |
} |
370 | 374 |
|
371 |
function use_more() { |
|
375 |
|
|
376 |
public function use_more() { |
|
372 | 377 |
$allow = $this->get_option('allow'); |
373 | 378 |
if (!$allow['more_link'] || !$this->has_pane_conf()) { |
374 | 379 |
return parent::use_more(); |
... | ... | |
377 | 382 |
return (bool) $conf['more_link']; |
378 | 383 |
} |
379 | 384 |
|
380 |
function get_path() { |
|
385 |
|
|
386 |
public function get_path() { |
|
381 | 387 |
if (empty($this->view->override_path)) { |
382 | 388 |
return parent::get_path(); |
383 | 389 |
} |
384 | 390 |
return $this->view->override_path; |
385 | 391 |
} |
386 | 392 |
|
387 |
function get_url() { |
|
393 |
|
|
394 |
public function get_url() { |
|
388 | 395 |
if ($this->get_option('inherit_panels_path')) { |
389 | 396 |
return $this->get_path(); |
390 | 397 |
} |
391 | 398 |
return parent::get_url(); |
392 | 399 |
} |
393 | 400 |
|
394 |
function uses_exposed_form_in_block() { |
|
401 |
|
|
402 |
public function uses_exposed_form_in_block() { |
|
395 | 403 |
// We'll always allow the exposed form in a block, regardless of path. |
396 | 404 |
return TRUE; |
397 | 405 |
} |
... | ... | |
405 | 413 |
* returns, exposed filters will not be used nor |
406 | 414 |
* displayed unless uses_exposed() returns TRUE. |
407 | 415 |
*/ |
408 |
function displays_exposed() { |
|
416 |
public function displays_exposed() {
|
|
409 | 417 |
$conf = $this->get_option('allow'); |
410 | 418 |
// If this is set, the exposed form is part of pane configuration, not |
411 | 419 |
// rendered normally. |
... | ... | |
413 | 421 |
} |
414 | 422 |
|
415 | 423 |
} |
416 |
|
Formats disponibles : Unified diff
Weekly update of contrib modules