Inheritance diagram for views_plugin_display_attachment:

Attachment displays are secondary displays that are 'attached' to a primary display. Effectively they are a simple way to get multiple views within the same view. They can share some information.
Definition at line 17 of file views_plugin_display_attachment.inc.
Public Member Functions | |
| option_definition () | |
| Information about options for all kinds of purposes will be held here. | |
| execute () | |
| When used externally, this is how a view gets run and returns data in the format required. | |
| attachment_positions ($position=NULL) | |
| options_summary (&$categories, &$options) | |
| Provide the summary for attachment options in the views UI. | |
| options_form (&$form, &$form_state) | |
| Provide the default form for setting options. | |
| options_submit ($form, &$form_state) | |
| Perform any necessary changes to the form values prior to storage. | |
| attach_to ($display_id) | |
| Attach to another view. | |
| uses_exposed () | |
| Attachment displays only use exposed widgets if they are set to inherit the exposed filter settings of their parent display. | |
| displays_exposed () | |
| If an attachment is set to inherit the exposed filter settings from its parent display, then don't render and display a second set of exposed filter widgets. | |
| init (&$view, &$display, $options=NULL) | |
| init (&$view, &$display) | |
| Init will be called after construct, when the plugin is attached to a view and a display. | |
| destroy () | |
| is_default_display () | |
| Determine if this display is the 'default' display which contains fallback settings. | |
| use_ajax () | |
| Does the display use AJAX? | |
| use_pager () | |
| Does the display have a pager enabled? | |
| use_more () | |
| Does the display have a more link enabled? | |
| use_more_text () | |
| Does the display have custom link text? | |
| accept_attachments () | |
| Can this display accept attachments? | |
| defaultable_sections ($section=NULL) | |
| Static member function to list which sections are defaultable and what items each section contains. | |
| _set_option_defaults (&$storage, $options, $level=0) | |
| Set default options. | |
| has_path () | |
| Check to see if the display has a 'path' field. | |
| uses_link_display () | |
| Check to see if the display has some need to link to another display. | |
| get_link_display () | |
| Check to see which display to use when creating links within a view using this display. | |
| get_path () | |
| Return the base path to use for this display. | |
| uses_breadcrumb () | |
| Check to see if the display needs a breadcrumb. | |
| is_defaulted ($option) | |
| Determine if a given option is set to use the default display or the current display. | |
| get_option ($option) | |
| Intelligently get an option either from this display or from the default display, if directed to do so. | |
| uses_fields () | |
| Determine if the display's style uses fields. | |
| get_plugin ($type= 'style', $name=NULL) | |
| Get the display or row plugin, if it exists. | |
| get_access_plugin ($name=NULL) | |
| Get the access plugin. | |
| get_cache_plugin ($name=NULL) | |
| Get the cache plugin. | |
| & | get_handler ($type, $id) |
| Get the handler object for a single handler. | |
| get_handlers ($type) | |
| Get a full array of handlers for $type. | |
| set_option ($option, $value) | |
| Intelligently set an option either from this display or from the default display, if directed to do so. | |
| override_option ($option, $value) | |
| Set an option and force it to be an override. | |
| option_link ($text, $section, $class= '', $title= '') | |
| Because forms may be split up into sections, this provides an easy URL to exactly the right section. | |
| format_themes ($themes) | |
| Format a list of theme templates for output by the theme info helper. | |
| options_validate ($form, &$form_state) | |
| Validate the options form. | |
| options_validate (&$form, &$form_state) | |
| Validate the options form. | |
| options_submit (&$form, &$form_state) | |
| Perform any necessary changes to the form values prior to storage. | |
| add_override_button (&$form, &$form_state, $section) | |
| Add an override button for a given section, allowing the user to change whether this info is stored on the default display or on the current display. | |
| options_override ($form, &$form_state) | |
| If override/revert was clicked, perform the proper toggle. | |
| set_override ($section, $new_state=NULL) | |
| Flip the override setting for the given section. | |
| query () | |
| Inject anything into the query that the display handler needs. | |
| render_filters () | |
| Not all display plugins will support filtering. | |
| render_more_link () | |
| Render the 'more' link. | |
| render_textarea ($area) | |
| Render a text area, using the proper format. | |
| render_header () | |
| Render the header of the view. | |
| render_footer () | |
| Render the footer of the view. | |
| render_empty () | |
| Render the empty text of the view. | |
| hook_block ($op= 'list', $delta=0, $edit=array()) | |
| If this display creates a block, implement one of these. | |
| hook_menu () | |
| If this display creates a page with a menu item, implement it here. | |
| render () | |
| Render this display. | |
| access ($account=NULL) | |
| Determine if the user has access to this display of the view. | |
| pre_execute () | |
| Set up any variables on the view prior to execution. | |
| preview () | |
| Fully render the display for the purposes of a live preview or some other AJAXy reason. | |
| get_style_type () | |
| Displays can require a certain type of style plugin. | |
| validate () | |
| Make sure the display and all associated handlers are valid. | |
| get_special_blocks () | |
| Provide the block system with any exposed widget blocks for this display. | |
| view_special_blocks ($type) | |
| Render any special blocks provided for this display. | |
| theme_functions () | |
| Provide a full list of possible theme templates used by this style. | |
| additional_theme_functions () | |
| Provide a list of additional theme functions for the theme information page. | |
| construct () | |
| Views handlers use a special construct function so that we can more easily construct them with variable arguments. | |
| options () | |
| Set default options on this object. | |
| set_default_options () | |
| Set default options. | |
| unpack_options (&$storage, $options, $definition=NULL) | |
| Unpack options over our existing defaults, drilling down into arrays so that defaults don't get totally blown away. | |
| set_definition ($definition) | |
| Let the handler know what its full definition is. | |
Public Attributes | |
| $handlers = array() | |
| $options = array() | |
| Except for displays, options for the object will be held here. | |
| views_plugin_display::_set_option_defaults | ( | &$ | storage, | |
| $ | options, | |||
| $ | level = 0 | |||
| ) | [inherited] |
Set default options.
Displays put their options in a different place than everything else; also displays spread their options out. We don't want to set defaults for items that are normally defaulted elsewhere.
Reimplemented from views_object.
Definition at line 204 of file views_plugin_display.inc.
References views_object::$options, and views_plugin_display::is_default_display().
00204 { 00205 foreach ($options as $option => $definition) { 00206 // If defaulted to elsewhere and we're not the default display, skip. 00207 if ($level == 0 && !$this->is_default_display() && !empty($options['defaults']['default'][$option])) { 00208 continue; 00209 } 00210 00211 if (isset($definition['contains']) && is_array($definition['contains'])) { 00212 $storage[$option] = array(); 00213 $this->_set_option_defaults($storage[$option], $definition['contains'], $level++); 00214 } 00215 else { 00216 $storage[$option] = isset($definition['default']) ? $definition['default'] : NULL; 00217 } 00218 } 00219 }
| views_plugin_display::accept_attachments | ( | ) | [inherited] |
| views_plugin_display::access | ( | $ | account = NULL |
) | [inherited] |
Determine if the user has access to this display of the view.
Definition at line 1734 of file views_plugin_display.inc.
References views_plugin_display::get_access_plugin().
Referenced by views_plugin_display::defaultable_sections(), views_plugin_display_page::execute_hook_menu(), views_plugin_display::get_access_plugin(), views_plugin_display::option_definition(), views_plugin_display_page::options_form(), views_plugin_display::options_form(), views_plugin_display::options_submit(), and views_plugin_display::options_summary().
01734 { 01735 if (!isset($account)) { 01736 global $user; 01737 $account = $user; 01738 } 01739 01740 // Full override. 01741 if (user_access('access all views', $account)) { 01742 return TRUE; 01743 } 01744 01745 $plugin = $this->get_access_plugin(); 01746 if ($plugin) { 01747 return $plugin->access($account); 01748 } 01749 01750 // fallback to all access if no plugin. 01751 return TRUE; 01752 }
| views_plugin_display::add_override_button | ( | &$ | form, | |
| &$ | form_state, | |||
| $ | section | |||
| ) | [inherited] |
Add an override button for a given section, allowing the user to change whether this info is stored on the default display or on the current display.
Definition at line 1558 of file views_plugin_display.inc.
References views_plugin_display::is_default_display(), views_plugin_display::is_defaulted(), and views_ui_edit_display_form_override().
Referenced by views_plugin_display::options_form().
01558 { 01559 if ($this->is_default_display()) { 01560 return; 01561 } 01562 01563 $form['override'] = array( 01564 '#prefix' => '<div class="views-override clear-block">', 01565 '#suffix' => '</div>', 01566 ); 01567 if ($this->is_defaulted($section)) { 01568 $form['override']['button'] = array( 01569 '#type' => 'submit', 01570 '#value' => t('Override'), 01571 '#submit' => array('views_ui_edit_display_form_override'), 01572 ); 01573 $form['override']['markup'] = array( 01574 '#prefix' => '<div class="description">', 01575 '#value' => theme('advanced_help_topic', 'views', 'overrides') . t('Status: using default values.'), 01576 '#suffix' => '</div>', 01577 ); 01578 01579 $form_state['update_name'] = t('Update default display'); 01580 } 01581 else { 01582 $form['override']['button'] = array( 01583 '#type' => 'submit', 01584 '#value' => t('Use default'), 01585 '#submit' => array('views_ui_edit_display_form_override'), 01586 ); 01587 $form['override']['markup'] = array( 01588 '#prefix' => '<div class="description">', 01589 '#value' => theme('advanced_help_topic', 'views', 'overrides') . t('Status: using overridden values.'), 01590 '#suffix' => '</div>', 01591 ); 01592 01593 $form_state['update_name'] = NULL; 01594 } 01595 }
| views_plugin::additional_theme_functions | ( | ) | [inherited] |
Provide a list of additional theme functions for the theme information page.
Definition at line 360 of file plugins.inc.
Referenced by views_plugin_display::options_form().
00360 { 00361 $funcs = array(); 00362 if (!empty($this->definition['additional themes'])) { 00363 foreach ($this->definition['additional themes'] as $theme => $type) { 00364 $funcs[] = views_theme_functions($theme, $this->view, $this->display); 00365 } 00366 } 00367 return $funcs; 00368 }
| views_plugin_display_attachment::attach_to | ( | $ | display_id | ) |
Attach to another view.
Reimplemented from views_plugin_display.
Definition at line 173 of file views_plugin_display_attachment.inc.
References $display_id, and views_plugin_display::get_option().
00173 { 00174 $displays = $this->get_option('displays'); 00175 00176 if (empty($displays[$display_id])) { 00177 return; 00178 } 00179 00180 // Get a fresh view because our current one has a lot of stuff on it because it's 00181 // already been executed. 00182 $view = $this->view->clone_view(); 00183 $view->original_args = $view->args; 00184 00185 $args = $this->get_option('inherit_arguments') ? $this->view->args : array(); 00186 $view->set_arguments($args); 00187 00188 // because of this, it is very very important that displays that can accept 00189 // attachments not also be attachments, or this could explode messily. 00190 $attachment = $view->execute_display($this->display->id, $args); 00191 00192 switch ($this->get_option('attachment_position')) { 00193 case 'before': 00194 $this->view->attachment_before .= $attachment; 00195 break; 00196 case 'after': 00197 $this->view->attachment_after .= $attachment; 00198 break; 00199 case 'both': 00200 $this->view->attachment_before .= $attachment; 00201 $this->view->attachment_after .= $attachment; 00202 break; 00203 } 00204 00205 $view->destroy(); 00206 }
| views_object::construct | ( | ) | [inherited] |
Views handlers use a special construct function so that we can more easily construct them with variable arguments.
Reimplemented in views_handler_argument, views_handler_argument_formula, views_handler_field, views_handler_field_markup, views_handler_filter_boolean_operator, views_handler_filter_in_operator, views_handler_sort_formula, views_handler_field_aggregator_category, views_handler_field_aggregator_title_link, views_handler_field_comment_link, views_handler_field_comment_link_edit, views_handler_field_comment_node_link, views_handler_field_node_new_comments, views_handler_field_filter_format_name, views_handler_argument_locale_group, views_handler_argument_locale_language, views_handler_field_locale_link_edit, views_handler_argument_node_created_fulldate, views_handler_argument_node_created_year, views_handler_argument_node_created_year_month, views_handler_argument_node_created_month, views_handler_argument_node_created_day, views_handler_argument_node_created_week, views_handler_argument_node_language, views_handler_argument_node_type, views_handler_field_node, views_handler_field_node_link, views_handler_field_node_link_delete, views_handler_field_node_link_edit, views_handler_field_node_revision_link_delete, views_handler_field_node_revision_link_revert, views_handler_field_taxonomy, views_handler_argument_node_language, views_handler_field_node_translation_link, views_handler_field_upload_fid, views_handler_filter_upload_fid, views_handler_field_user_link, views_handler_field_user_picture, views_handler_field_user_roles, and views_handler_filter_user_current.
Definition at line 40 of file base.inc.
References views_object::set_default_options().
00040 { $this->set_default_options(); }
| views_plugin_display::defaultable_sections | ( | $ | section = NULL |
) | [inherited] |
Static member function to list which sections are defaultable and what items each section contains.
Reimplemented in views_plugin_display_feed.
Definition at line 158 of file views_plugin_display.inc.
References views_plugin_display::access(), views_plugin_display::use_ajax(), views_plugin_display::use_more(), views_plugin_display::use_more_text(), and views_plugin_display::use_pager().
Referenced by views_plugin_display::options_form(), and views_plugin_display::set_override().
00158 { 00159 $sections = array( 00160 'access' => array('access'), 00161 'cache' => array('cache'), 00162 'title' => array('title'), 00163 'header' => array('header', 'header_format', 'header_empty'), 00164 'footer' => array('footer', 'footer_format', 'footer_empty'), 00165 'empty' => array('empty', 'empty_format'), 00166 'use_ajax' => array('use_ajax'), 00167 'items_per_page' => array('items_per_page', 'offset', 'use_pager', 'pager_element'), 00168 'use_pager' => array('items_per_page', 'offset', 'use_pager', 'pager_element'), 00169 'use_more' => array('use_more', 'use_more_text'), 00170 'link_display' => array('link_display'), 00171 'distinct' => array('distinct'), 00172 'exposed_block' => array('exposed_block'), 00173 00174 // Force these to cascade properly. 00175 'style_plugin' => array('style_plugin', 'style_options', 'row_plugin', 'row_options'), 00176 'style_options' => array('style_plugin', 'style_options', 'row_plugin', 'row_options'), 00177 'row_plugin' => array('style_plugin', 'style_options', 'row_plugin', 'row_options'), 00178 'row_options' => array('style_plugin', 'style_options', 'row_plugin', 'row_options'), 00179 00180 // These guys are special 00181 'relationships' => array('relationships'), 00182 'fields' => array('fields'), 00183 'sorts' => array('sorts'), 00184 'arguments' => array('arguments'), 00185 'filters' => array('filters'), 00186 ); 00187 if ($section) { 00188 if (!empty($sections[$section])) { 00189 return $sections[$section]; 00190 } 00191 } 00192 else { 00193 return $sections; 00194 } 00195 }
| views_plugin_display_attachment::displays_exposed | ( | ) |
If an attachment is set to inherit the exposed filter settings from its parent display, then don't render and display a second set of exposed filter widgets.
Reimplemented from views_plugin_display.
Definition at line 225 of file views_plugin_display_attachment.inc.
References views_object::options().
00225 { 00226 return $this->options['inherit_exposed_filters'] ? FALSE : TRUE; 00227 }
| views_plugin_display_attachment::execute | ( | ) |
When used externally, this is how a view gets run and returns data in the format required.
The base class cannot be executed.
Reimplemented from views_plugin_display.
Definition at line 29 of file views_plugin_display_attachment.inc.
00029 { 00030 return $this->view->render($this->display->id); 00031 }
| views_plugin_display::format_themes | ( | $ | themes | ) | [inherited] |
Format a list of theme templates for output by the theme info helper.
Definition at line 1353 of file views_plugin_display.inc.
Referenced by views_plugin_display::options_form().
01353 { 01354 $registry = theme_get_registry(); 01355 01356 // Run through the theme engine variables, if necessary 01357 global $theme_engine; 01358 $extension = '.tpl.php'; 01359 if (isset($theme_engine)) { 01360 $extension_function = $theme_engine . '_extension'; 01361 if (function_exists($extension_function)) { 01362 $extension = $extension_function(); 01363 } 01364 } 01365 01366 $output = ''; 01367 $picked = FALSE; 01368 foreach ($themes as $theme) { 01369 $template = strtr($theme, '_', '-') . $extension; 01370 if (!$picked && !empty($registry[$theme])) { 01371 $template_path = isset($registry[$theme]['path']) ? $registry[$theme]['path'] . '/' : './'; 01372 if (file_exists($template_path . $template)) { 01373 $hint = t('File found in folder @template-path', array('@template-path' => $template_path)); 01374 $template = '<strong title="'. $hint .'">' . $template . '</strong>'; 01375 } 01376 else { 01377 $template = '<strong class="error">' . $template . ' ' . t('(File not found, in folder @template-path)', array('@template-path' => $template_path)) . '</strong>'; 01378 } 01379 $picked = TRUE; 01380 } 01381 $fixed[] = $template; 01382 } 01383 01384 return implode(', ', array_reverse($fixed)); 01385 }
| views_plugin_display::get_access_plugin | ( | $ | name = NULL |
) | [inherited] |
Get the access plugin.
Definition at line 493 of file views_plugin_display.inc.
References $name, views_plugin_display::access(), and views_plugin_display::get_option().
Referenced by views_plugin_display::access(), views_plugin_display_page::execute_hook_menu(), views_plugin_display::options_form(), views_plugin_display::options_summary(), and views_plugin_display::options_validate().
00493 { 00494 if (!$name) { 00495 $access = $this->get_option('access'); 00496 $name = $access['type']; 00497 } 00498 00499 $plugin = views_get_plugin('access', $name); 00500 if ($plugin) { 00501 $plugin->init($this->view, $this->display); 00502 return $plugin; 00503 } 00504 }
| views_plugin_display::get_cache_plugin | ( | $ | name = NULL |
) | [inherited] |
Get the cache plugin.
Definition at line 509 of file views_plugin_display.inc.
References $name, and views_plugin_display::get_option().
Referenced by views_plugin_display::options_form(), views_plugin_display::options_submit(), views_plugin_display::options_summary(), and views_plugin_display::options_validate().
00509 { 00510 if (!$name) { 00511 $cache = $this->get_option('cache'); 00512 $name = $cache['type']; 00513 } 00514 00515 $plugin = views_get_plugin('cache', $name); 00516 if ($plugin) { 00517 $plugin->init($this->view, $this->display); 00518 return $plugin; 00519 } 00520 }
| & views_plugin_display::get_handler | ( | $ | type, | |
| $ | id | |||
| ) | [inherited] |
Get the handler object for a single handler.
Definition at line 525 of file views_plugin_display.inc.
References views_plugin_display::get_handlers().
00525 { 00526 if (!isset($this->handlers[$type])) { 00527 $this->get_handlers($type); 00528 } 00529 00530 if (isset($this->handlers[$type][$id])) { 00531 return $this->handlers[$type][$id]; 00532 } 00533 00534 // So we can return a reference. 00535 $null = NULL; 00536 return $null; 00537 }
| views_plugin_display::get_handlers | ( | $ | type | ) | [inherited] |
Get a full array of handlers for $type.
This caches them.
Definition at line 542 of file views_plugin_display.inc.
References views_plugin_display::get_option(), and views_object_types().
Referenced by views_plugin_display::get_handler(), views_plugin_display::options_form(), and views_plugin_display::validate().
00542 { 00543 if (!isset($this->handlers[$type])) { 00544 $this->handlers[$type] = array(); 00545 $types = views_object_types(); 00546 $plural = $types[$type]['plural']; 00547 foreach ($this->get_option($plural) as $id => $info) { 00548 $handler = views_get_handler($info['table'], $info['field'], $type); 00549 if ($handler) { 00550 $handler->init($this->view, $info); 00551 $this->handlers[$type][$id] = &$handler; 00552 } 00553 00554 // Prevent reference problems. 00555 unset($handler); 00556 } 00557 } 00558 00559 return $this->handlers[$type]; 00560 }
| views_plugin_display::get_link_display | ( | ) | [inherited] |
Check to see which display to use when creating links within a view using this display.
Definition at line 399 of file views_plugin_display.inc.
References $display_id, and views_plugin_display::get_option().
Referenced by views_plugin_display::get_path(), views_plugin_display::options_form(), and views_plugin_display::options_summary().
00399 { 00400 $display_id = $this->get_option('link_display'); 00401 // If unknown, pick the first one. 00402 if (empty($display_id) || empty($this->view->display[$display_id])) { 00403 foreach ($this->view->display as $display_id => $display) { 00404 if (!empty($display->handler) && $display->handler->has_path()) { 00405 return $display_id; 00406 } 00407 } 00408 } 00409 else { 00410 return $display_id; 00411 } 00412 // fall-through returns NULL 00413 }
| views_plugin_display::get_option | ( | $ | option | ) | [inherited] |
Intelligently get an option either from this display or from the default display, if directed to do so.
Definition at line 454 of file views_plugin_display.inc.
References views_plugin_display::is_defaulted(), and views_object::options().
Referenced by views_plugin_display_feed::attach_to(), attach_to(), views_plugin_display_block::execute_hook_block(), views_plugin_display_page::execute_hook_menu(), views_plugin_display::get_access_plugin(), views_plugin_display::get_cache_plugin(), views_plugin_display_block::get_cache_type(), views_plugin_display::get_handlers(), views_plugin_display::get_link_display(), views_plugin_display::get_path(), views_plugin_display::get_plugin(), views_plugin_display_page::options_form(), views_plugin_display_feed::options_form(), options_form(), views_plugin_display::options_form(), views_plugin_display::options_submit(), views_plugin_display_page::options_summary(), views_plugin_display_feed::options_summary(), views_plugin_display_block::options_summary(), options_summary(), views_plugin_display::options_summary(), views_plugin_display_page::options_validate(), views_plugin_display::pre_execute(), views_plugin_display::query(), views_plugin_display::render_textarea(), views_plugin_display::set_override(), views_plugin_display::use_ajax(), views_plugin_display::use_more(), views_plugin_display::use_more_text(), views_plugin_display::use_pager(), views_plugin_display_page::validate(), and views_plugin_display::validate().
00454 { 00455 if ($this->is_defaulted($option)) { 00456 return $this->default_display->get_option($option); 00457 } 00458 00459 if (array_key_exists($option, $this->options)) { 00460 return $this->options[$option]; 00461 } 00462 }
| views_plugin_display::get_path | ( | ) | [inherited] |
Return the base path to use for this display.
This can be overridden for displays that do strange things with the path.
Definition at line 421 of file views_plugin_display.inc.
References $display_id, views_plugin_display::get_link_display(), views_plugin_display::get_option(), and views_plugin_display::has_path().
Referenced by views_plugin_display_feed::attach_to(), and views_plugin_display::render_more_link().
00421 { 00422 if ($this->has_path()) { 00423 return $this->get_option('path'); 00424 } 00425 00426 $display_id = $this->get_link_display(); 00427 if ($display_id && !empty($this->view->display[$display_id]) && is_object($this->view->display[$display_id]->handler)) { 00428 return $this->view->display[$display_id]->handler->get_path(); 00429 } 00430 }
| views_plugin_display::get_plugin | ( | $ | type = 'style', |
|
| $ | name = NULL | |||
| ) | [inherited] |
Get the display or row plugin, if it exists.
Definition at line 477 of file views_plugin_display.inc.
References $name, views_object::$options, and views_plugin_display::get_option().
Referenced by views_plugin_display_feed::attach_to(), views_plugin_display::options_form(), views_plugin_display::options_submit(), views_plugin_display::options_validate(), views_plugin_display::uses_fields(), and views_plugin_display::validate().
00477 { 00478 if (!$name) { 00479 $name = $this->get_option($type . '_plugin'); 00480 } 00481 00482 $plugin = views_get_plugin($type, $name); 00483 if ($plugin) { 00484 $options = $this->get_option($type . '_options'); 00485 $plugin->init($this->view, $this->display, $options); 00486 return $plugin; 00487 } 00488 }
| views_plugin_display::get_special_blocks | ( | ) | [inherited] |
Provide the block system with any exposed widget blocks for this display.
Definition at line 1850 of file views_plugin_display.inc.
01850 { 01851 $delta = '-exp-' . $this->view->name . '-' . $this->display->id; 01852 $desc = t('Exposed form: @view-@display_id', array('@view' => $this->view->name, '@display_id' => $this->display->id)); 01853 01854 return array( 01855 $delta => array( 01856 'info' => $desc, 01857 ) 01858 ); 01859 }
| views_plugin_display::get_style_type | ( | ) | [inherited] |
Displays can require a certain type of style plugin.
By default, they will be 'normal'.
Reimplemented in views_plugin_display_feed.
Definition at line 1789 of file views_plugin_display.inc.
Referenced by views_plugin_display::options_form().
| views_plugin_display::has_path | ( | ) | [inherited] |
Check to see if the display has a 'path' field.
This is a pure function and not just a setting on the definition because some displays (such as a panel pane) may have a path based upon configuration.
By default, displays do not have a path.
Reimplemented in views_plugin_display_page.
Definition at line 384 of file views_plugin_display.inc.
Referenced by views_plugin_display::get_path(), views_plugin_display::uses_link_display(), and views_plugin_display::validate().
| views_plugin_display::hook_block | ( | $ | op = 'list', |
|
| $ | delta = 0, |
|||
| $ | edit = array() | |||
| ) | [inherited] |
If this display creates a block, implement one of these.
Definition at line 1717 of file views_plugin_display.inc.
| views_plugin_display::hook_menu | ( | ) | [inherited] |
If this display creates a page with a menu item, implement it here.
Definition at line 1722 of file views_plugin_display.inc.
| views_plugin::init | ( | &$ | view, | |
| &$ | display | |||
| ) | [inherited] |
Init will be called after construct, when the plugin is attached to a view and a display.
Reimplemented in views_plugin_access, and views_plugin_cache.
Definition at line 325 of file plugins.inc.
00325 { 00326 $this->view = &$view; 00327 $this->display = &$display; 00328 }
| views_plugin_display::is_default_display | ( | ) | [inherited] |
Determine if this display is the 'default' display which contains fallback settings.
Reimplemented in views_plugin_display_default.
Definition at line 66 of file views_plugin_display.inc.
Referenced by views_plugin_display::_set_option_defaults(), views_plugin_display::add_override_button(), views_plugin_display::init(), views_plugin_display::is_defaulted(), and views_plugin_display::option_definition().
| views_plugin_display::is_defaulted | ( | $ | option | ) | [inherited] |
Determine if a given option is set to use the default display or the current display.
Definition at line 446 of file views_plugin_display.inc.
References views_plugin_display::is_default_display(), and views_object::options().
Referenced by views_plugin_display::add_override_button(), views_plugin_display::get_option(), views_plugin_display::set_option(), and views_plugin_display::validate().
00446 { 00447 return !$this->is_default_display() && !empty($this->default_display) && !empty($this->options['defaults'][$option]); 00448 }
| views_plugin_display_attachment::option_definition | ( | ) |
Information about options for all kinds of purposes will be held here.
'option_name' => array( - 'default' => default value, - 'translatable' => TRUE/FALSE (wrap in t() on export if true), - 'contains' => array of items this contains, with its own defaults, etc. If contains is set, the default will be ignored and assumed to be array() ),
Reimplemented from views_plugin_display.
Definition at line 18 of file views_plugin_display_attachment.inc.
References views_object::$options.
00018 { 00019 $options = parent::option_definition(); 00020 00021 $options['attachment_position'] = array('default' => 'before'); 00022 $options['inherit_arguments'] = array('default' => TRUE); 00023 $options['inherit_exposed_filters'] = array('default' => FALSE); 00024 $options['displays'] = array('default' => array()); 00025 00026 return $options; 00027 }
| views_plugin_display::option_link | ( | $ | text, | |
| $ | section, | |||
| $ | class = '', |
|||
| $ | title = '' | |||
| ) | [inherited] |
Because forms may be split up into sections, this provides an easy URL to exactly the right section.
Don't override this.
Definition at line 590 of file views_plugin_display.inc.
References $class, and $title.
Referenced by views_plugin_display::options_form().
00590 { 00591 if (!empty($class)) { 00592 $text = '<span>' . $text . '</span>'; 00593 } 00594 00595 if (!trim($text)) { 00596 $text = t('Broken field'); 00597 } 00598 00599 if (empty($title)) { 00600 $title = $text; 00601 } 00602 00603 return l($text, 'admin/build/views/nojs/display/' . $this->view->name . '/' . $this->display->id . '/' . $section, array('attributes' => array('class' => 'views-ajax-link ' . $class, 'title' => $title), 'html' => TRUE)); 00604 }
| views_object::options | ( | ) | [inherited] |
Set default options on this object.
Called by the constructor in a complex chain to deal with backward compatibility.
Definition at line 46 of file base.inc.
Referenced by views_handler_filter_term_node_tid::accept_exposed_input(), views_handler_filter_numeric::accept_exposed_input(), views_handler_filter_in_operator::accept_exposed_input(), views_handler_filter_date::accept_exposed_input(), views_handler_filter::accept_exposed_input(), views_plugin_access_role::access(), views_plugin_access_perm::access(), views_handler_filter_history_user_timestamp::admin_summary(), views_handler_sort::admin_summary(), views_handler_filter_string::admin_summary(), views_handler_filter_numeric::admin_summary(), views_handler_filter_in_operator::admin_summary(), views_handler_filter_boolean_operator::admin_summary(), views_plugin_argument_default_php::argument_form(), views_plugin_argument_default::argument_form(), views_plugin_argument_default_user::argument_form(), views_plugin_style_table::build_sort(), views_plugin_cache_time::cache_expire(), views_handler_filter_string::case_transform(), views_handler_argument_string::case_transform(), views_handler_field::construct(), views_handler_argument::default_action(), views_handler_argument_date::default_argument_form(), views_handler_argument::default_argument_form(), views_handler_argument::default_summary(), displays_exposed(), views_handler_filter::expose_form_left(), views_handler_filter_term_node_tid::expose_form_right(), views_handler_filter_in_operator::expose_form_right(), views_handler_filter::expose_form_right(), views_handler_filter_in_operator::expose_options(), views_handler_filter_boolean_operator::expose_options(), views_handler_filter::expose_options(), views_handler_filter::expose_validate(), views_handler_filter_search::exposed_form(), views_handler_filter::exposed_form(), views_handler_filter::exposed_info(), views_handler_filter::exposed_translate(), views_handler_filter_user_name::exposed_validate(), views_handler_filter_term_node_tid::exposed_validate(), views_handler_filter_search::exposed_validate(), views_handler_filter_date::exposed_validate(), views_handler_filter_term_node_tid_depth::extra_options_form(), views_handler_filter_term_node_tid::extra_options_form(), views_plugin_access_role::get_access_callback(), views_plugin_access_perm::get_access_callback(), views_handler_argument_date::get_default_argument(), views_handler_argument::get_default_argument(), views_handler_argument_string::get_formula(), views_plugin_display::get_option(), views_handler_filter_profile_selection::get_value_options(), views_handler_filter_in_operator::get_value_options(), views_handler_argument::has_default_argument(), views_plugin_style::init(), views_plugin_row::init(), views_plugin_display::init(), views_plugin_cache::init(), views_plugin_access::init(), views_handler_field_user_name::init(), views_handler_field_user::init(), views_plugin_row_node_view::init(), views_handler_field_history_user_timestamp::init(), views_handler_field_comment::init(), views_handler::init(), views_handler_filter::init(), views_handler_field::init(), views_plugin_display::is_defaulted(), views_handler::is_exposed(), views_handler_argument::is_wildcard(), views_handler_relationship::label(), views_handler_field::label(), views_handler_argument::needs_style_plugin(), views_handler_filter_numeric::op_between(), views_handler_filter_float::op_between(), views_handler_filter_date::op_between(), views_handler_filter_string::op_contains(), views_handler_filter_string::op_empty(), views_handler_filter_numeric::op_empty(), views_handler_filter_in_operator::op_empty(), views_handler_filter_string::op_ends(), views_handler_filter_string::op_equal(), views_handler_filter_string::op_not(), views_handler_filter_numeric::op_simple(), views_handler_filter_in_operator::op_simple(), views_handler_filter_float::op_simple(), views_handler_filter_date::op_simple(), views_handler_filter_string::op_starts(), views_handler_filter_string::op_word(), views_handler_filter_node_tnid::operator_form(), views_handler_filter_search::operator_form(), views_handler_filter::operator_form(), views_plugin_style_table::options_form(), views_plugin_style_summary_unformatted::options_form(), views_plugin_style_summary::options_form(), views_plugin_style_rss::options_form(), views_plugin_style_list::options_form(), views_plugin_style_grid::options_form(), views_plugin_style::options_form(), views_plugin_row_fields::options_form(), views_plugin_row::options_form(), views_plugin_display_page::options_form(), views_plugin_display_feed::options_form(), views_plugin_display_block::options_form(), options_form(), views_plugin_display::options_form(), views_plugin_cache_time::options_form(), views_plugin_access_role::options_form(), views_plugin_access_perm::options_form(), views_handler_field_user_name::options_form(), views_handler_field_user_mail::options_form(), views_handler_field_user_link::options_form(), views_handler_field_upload_fid::options_form(), views_handler_field_upload_description::options_form(), views_handler_relationship_translation::options_form(), views_handler_field_term_node_tid::options_form(), views_handler_field_taxonomy::options_form(), views_handler_argument_term_node_tid_depth::options_form(), views_handler_argument_term_node_tid::options_form(), views_handler_field_file::options_form(), views_handler_field_accesslog_path::options_form(), views_plugin_row_search_view::options_form(), views_handler_field_search_score::options_form(), views_handler_field_profile_date::options_form(), views_plugin_row_node_view::options_form(), views_plugin_row_node_rss::options_form(), views_handler_field_node_link::options_form(), views_handler_field_node::options_form(), views_handler_field_history_user_timestamp::options_form(), views_handler_field_locale_link_edit::options_form(), views_handler_field_contact_link::options_form(), views_plugin_row_comment_view::options_form(), views_handler_field_node_new_comments::options_form(), views_handler_field_comment_username::options_form(), views_handler_field_comment_node_link::options_form(), views_handler_field_comment_link::options_form(), views_plugin_row_aggregator_rss::options_form(), views_handler_field_aggregator_title_link::options_form(), views_handler_field_aggregator_category::options_form(), views_handler_sort_date::options_form(), views_handler_sort::options_form(), views_handler_relationship::options_form(), views_handler_filter_string::options_form(), views_handler_field_url::options_form(), views_handler_field_prerender_list::options_form(), views_handler_field_numeric::options_form(), views_handler_field_date::options_form(), views_handler_field_boolean::options_form(), views_handler_field_file_size::options_form(), views_handler_field::options_form(), views_handler_argument_string::options_form(), views_handler_argument_numeric::options_form(), views_handler_argument_null::options_form(), views_handler_argument_many_to_one::options_form(), views_handler_argument::options_form(), views_plugin_display::options_submit(), views_handler_filter::options_submit(), views_plugin_display::options_summary(), views_handler_filter_date::options_validate(), views_handler_filter::options_validate(), views_handler_argument_term_node_tid_depth_modifier::pre_query(), views_handler_field_upload_description::pre_render(), views_handler_field_term_node_tid::pre_render(), views_plugin_style_summary::query(), views_plugin_row::query(), views_handler_filter_user_current::query(), views_handler_filter_upload_fid::query(), views_handler_relationship_translation::query(), views_handler_filter_node_tnid_child::query(), views_handler_filter_node_tnid::query(), views_handler_filter_term_node_tid_depth::query(), views_handler_argument_term_node_tid_depth::query(), views_handler_sort_search_score::query(), views_handler_filter_search::query(), views_handler_field_search_score::query(), views_handler_filter_node_status::query(), views_handler_filter_history_user_timestamp::query(), views_handler_sort_ncs_last_updated::query(), views_handler_sort_ncs_last_comment_name::query(), views_handler_sort_comment_thread::query(), views_handler_filter_comment_user_uid::query(), views_handler_sort_random::query(), views_handler_sort_formula::query(), views_handler_sort_date::query(), views_handler_sort::query(), views_handler_relationship::query(), views_handler_filter_boolean_operator_string::query(), views_handler_filter_boolean_operator::query(), views_handler_filter::query(), views_handler_argument_string::query(), views_handler_argument_numeric::query(), views_handler_argument_many_to_one::query(), views_handler_filter_in_operator::reduce_value_options(), views_plugin_style_summary::render(), views_plugin_style_rss::render(), views_plugin_style::render(), views_plugin_row::render(), views_handler_field_user_mail::render(), views_handler_field_user_link_edit::render(), views_handler_field_user_link_delete::render(), views_handler_field_user_link::render(), views_handler_field_accesslog_path::render(), views_plugin_row_search_view::render(), views_handler_field_profile_date::render(), views_handler_field_node_link::render(), views_handler_field_locale_link_edit::render(), views_plugin_row_comment_rss::render(), views_handler_field_ncs_last_comment_name::render(), views_handler_field_comment_link_reply::render(), views_handler_field_comment_link_delete::render(), views_handler_field_comment_link::render(), views_plugin_row_aggregator_rss::render(), views_handler_field_file_size::render(), views_handler_field_user_name::render_link(), views_handler_field_user_language::render_link(), views_handler_field_user::render_link(), views_handler_field_upload_description::render_link(), views_handler_field_taxonomy::render_link(), views_handler_field_file::render_link(), views_handler_field_node::render_link(), views_handler_field_comment_username::render_link(), views_handler_field_comment::render_link(), views_handler_field_aggregator_category::render_link(), views_handler_argument_term_node_tid_depth::set_breadcrumb(), views_handler_argument_term_node_tid::set_breadcrumb(), views_object::set_default_options(), views_plugin_display::set_option(), views_plugin_display::set_override(), views_handler::set_relationship(), views_handler_filter::show_expose_button(), views_handler_filter::show_expose_form(), views_handler_filter::store_exposed_input(), views_handler_argument_string::summary_argument(), views_handler_argument_string::summary_query(), views_handler_argument_many_to_one::summary_query(), views_plugin_cache_time::summary_title(), views_plugin_access_role::summary_title(), views_plugin_access_perm::summary_title(), views_handler_argument_string::title(), views_handler_argument_numeric::title(), views_handler_argument_many_to_one::title(), views_handler_argument::uses_breadcrumb(), uses_exposed(), views_plugin_display::validate(), views_handler_argument_null::validate_argument_basic(), views_handler_argument::validate_fail(), views_plugin_argument_validate_php::validate_form(), views_plugin_argument_validate_user::validate_form(), views_plugin_argument_validate_taxonomy_term::validate_form(), views_plugin_argument_validate_node::validate_form(), views_handler_filter_term_node_tid::validate_term_strings(), views_handler_filter_user_name::value_form(), views_handler_filter_term_node_tid::value_form(), views_handler_filter_history_user_timestamp::value_form(), views_handler_filter_string::value_form(), views_handler_filter_numeric::value_form(), views_handler_filter_in_operator::value_form(), views_handler_filter_equality::value_form(), views_handler_filter_date::value_form(), views_handler_filter_boolean_operator::value_form(), views_handler_filter_in_operator::value_submit(), views_handler_filter_user_name::value_validate(), views_handler_filter_term_node_tid::value_validate(), views_handler_filter_boolean_operator::value_validate(), and views_handler_argument::wildcard_title().
| views_plugin_display_attachment::options_form | ( | &$ | form, | |
| &$ | form_state | |||
| ) |
Provide the default form for setting options.
Reimplemented from views_plugin_display.
Definition at line 103 of file views_plugin_display_attachment.inc.
References $display_id, attachment_positions(), views_plugin_display::get_option(), and views_object::options().
00103 { 00104 // It is very important to call the parent function here: 00105 parent::options_form($form, $form_state); 00106 00107 switch ($form_state['section']) { 00108 case 'inherit_arguments': 00109 $form['#title'] .= t('Inherit arguments'); 00110 $form['inherit_arguments'] = array( 00111 '#type' => 'checkbox', 00112 '#title' => t('Inherit'), 00113 '#description' => t('Should this display inherit its arguments from the parent display to which it is attached?'), 00114 '#default_value' => $this->get_option('inherit_arguments'), 00115 ); 00116 break; 00117 case 'inherit_exposed_filters': 00118 $form['#title'] .= t('Inherit exposed filters'); 00119 $form['inherit_exposed_filters'] = array( 00120 '#type' => 'checkbox', 00121 '#title' => t('Inherit'), 00122 '#description' => t('Should this display inherit its exposed filter values from the parent display to which it is attached?'), 00123 '#default_value' => $this->get_option('inherit_exposed_filters'), 00124 ); 00125 break; 00126 case 'attachment_position': 00127 $form['#title'] .= t('Position'); 00128 $form['attachment_position'] = array( 00129 '#type' => 'radios', 00130 '#description' => t('Attach before or after the parent display?'), 00131 '#options' => $this->attachment_positions(), 00132 '#default_value' => $this->get_option('attachment_position'), 00133 ); 00134 break; 00135 case 'displays': 00136 $form['#title'] .= t('Attach to'); 00137 $displays = array(); 00138 foreach ($this->view->display as $display_id => $display) { 00139 if (!empty($display->handler) && $display->handler->accept_attachments()) { 00140 $displays[$display_id] = $display->display_title; 00141 } 00142 } 00143 $form['displays'] = array( 00144 '#type' => 'checkboxes', 00145 '#description' => t('Select which display or displays this should attach to.'), 00146 '#options' => $displays, 00147 '#default_value' => $this->get_option('displays'), 00148 ); 00149 break; 00150 } 00151 }
| views_plugin_display::options_override | ( | $ | form, | |
| &$ | form_state | |||
| ) | [inherited] |
If override/revert was clicked, perform the proper toggle.
Definition at line 1600 of file views_plugin_display.inc.
References views_plugin_display::set_override().
01600 { 01601 $this->set_override($form_state['section']); 01602 }
| views_plugin_display::options_submit | ( | &$ | form, | |
| &$ | form_state | |||
| ) | [inherited] |
Perform any necessary changes to the form values prior to storage.
There is no need for this function to actually store the data.
Reimplemented from views_plugin.
Definition at line 1420 of file views_plugin_display.inc.
References views_plugin_display::access(), views_plugin_display::get_cache_plugin(), views_plugin_display::get_option(), views_plugin_display::get_plugin(), views_object::options(), views_plugin_display::set_option(), views_plugin_display::use_ajax(), views_plugin_display::use_more(), views_plugin_display::use_more_text(), views_plugin_display::use_pager(), and views_ui_add_form_to_stack().
01420 { 01421 // Not sure I like this being here, but it seems (?) like a logical place. 01422 $cache_plugin = $this->get_cache_plugin(); 01423 if ($cache_plugin) { 01424 $cache_plugin->cache_flush(); 01425 } 01426 01427 $section = $form_state['section']; 01428 switch ($section) { 01429 case 'display_title': 01430 $this->display->display_title = $form_state['values']['display_title']; 01431 break; 01432 case 'access': 01433 $access = $this->get_option('access'); 01434 if ($access['type'] != $form_state['values']['access']['type']) { 01435 $plugin = views_get_plugin('access', $form_state['values']['access']['type']); 01436 if ($plugin) { 01437 $access = array('type' => $form_state['values']['access']['type']); 01438 $plugin->option_defaults($access); 01439 $this->set_option('access', $access); 01440 if (!empty($plugin->definition['uses options'])) { 01441 views_ui_add_form_to_stack('display', $this->view, $this->display->id, array('access_options')); 01442 } 01443 } 01444 } 01445 01446 break; 01447 case 'access_options': 01448 $plugin = views_get_plugin('access', $form_state['values'][$section]['type']); 01449 if ($plugin) { 01450 $plugin->options_submit($form['access_options'], $form_state); 01451 $this->set_option('access', $form_state['values'][$section]); 01452 } 01453 break; 01454 case 'cache': 01455 $cache = $this->get_option('cache'); 01456 if ($cache['type'] != $form_state['values']['cache']['type']) { 01457 $plugin = views_get_plugin('cache', $form_state['values']['cache']['type']); 01458 if ($plugin) { 01459 $cache = array('type' => $form_state['values']['cache']['type']); 01460 $plugin->option_defaults($cache); 01461 $this->set_option('cache', $cache); 01462 if (!empty($plugin->definition['uses options'])) { 01463 views_ui_add_form_to_stack('display', $this->view, $this->display->id, array('cache_options')); 01464 } 01465 } 01466 } 01467 01468 break; 01469 case 'cache_options': 01470 $plugin = views_get_plugin('cache', $form_state['values'][$section]['type']); 01471 if ($plugin) { 01472 $plugin->options_submit($form['cache_options'], $form_state); 01473 $this->set_option('cache', $form_state['values'][$section]); 01474 } 01475 break; 01476 case 'title': 01477 case 'link_display': 01478 $this->set_option($section, $form_state['values'][$section]); 01479 break; 01480 case 'use_ajax': 01481 $this->set_option($section, (bool)$form_state['values'][$section]); 01482 break; 01483 case 'use_pager': 01484 $this->set_option($section, $form_state['values'][$section]); 01485 $this->set_option('pager_element', intval($form_state['values']['pager_element'])); 01486 break; 01487 case 'items_per_page': 01488 $this->set_option($section, intval($form_state['values'][$section])); 01489 $this->set_option('offset', intval($form_state['values']['offset'])); 01490 break; 01491 case 'use_more': 01492 $this->set_option($section, intval($form_state['values'][$section])); 01493 $this->set_option('use_more_text', $form_state['values']['use_more_text']); 01494 case 'distinct': 01495 $this->set_option($section, $form_state['values'][$section]); 01496 break; 01497 case 'row_plugin': 01498 // This if prevents resetting options to default if they don't change 01499 // the plugin. 01500 if ($this->get_option($section) != $form_state['values'][$section]) { 01501 $plugin = views_get_plugin('row', $form_state['values'][$section]); 01502 if ($plugin) { 01503 $this->set_option($section, $form_state['values'][$section]); 01504 $this->set_option('row_options', array()); 01505 01506 // send ajax form to options page if we use it. 01507 if (!empty($plugin->definition['uses options'])) { 01508 views_ui_add_form_to_stack('display', $this->view, $this->display->id, array('row_options')); 01509 } 01510 } 01511 } 01512 break; 01513 case 'style_plugin': 01514 // This if prevents resetting options to default if they don't change 01515 // the plugin. 01516 if ($this->get_option($section) != $form_state['values'][$section]) { 01517 $plugin = views_get_plugin('style', $form_state['values'][$section]); 01518 if ($plugin) { 01519 $this->set_option($section, $form_state['values'][$section]); 01520 $this->set_option('style_options', array()); 01521 // send ajax form to options page if we use it. 01522 if (!empty($plugin->definition['uses options'])) { 01523 views_ui_add_form_to_stack('display', $this->view, $this->display->id, array('style_options')); 01524 } 01525 } 01526 } 01527 break; 01528 case 'style_options': 01529 $style = TRUE; 01530 case 'row_options': 01531 // if row, $style will be empty. 01532 $plugin = $this->get_plugin(empty($style) ? 'row' : 'style'); 01533 if ($plugin) { 01534 $plugin->options_submit($form[$section], $form_state); 01535 } 01536 $this->set_option($section, $form_state['values'][$section]); 01537 break; 01538 case 'header': 01539 case 'footer': 01540 case 'empty': 01541 $this->set_option($section, $form_state['values'][$section]); 01542 $this->set_option($section . '_format', $form_state['values'][$section . '_format']); 01543 if ($section != 'empty') { 01544 $this->set_option($section . '_empty', $form_state['values'][$section . '_empty']); 01545 } 01546 break; 01547 case 'exposed_block': 01548 $this->set_option($section, (bool) $form_state['values'][$section]); 01549 break; 01550 } 01551 }
| views_plugin_display_attachment::options_submit | ( | $ | form, | |
| &$ | form_state | |||
| ) |
Perform any necessary changes to the form values prior to storage.
There is no need for this function to actually store the data.
Definition at line 157 of file views_plugin_display_attachment.inc.
References views_plugin_display::set_option().
00157 { 00158 // It is very important to call the parent function here: 00159 parent::options_submit($form, $form_state); 00160 switch ($form_state['section']) { 00161 case 'inherit_arguments': 00162 case 'inherit_exposed_filters': 00163 case 'attachment_position': 00164 case 'displays': 00165 $this->set_option($form_state['section'], $form_state['values'][$form_state['section']]); 00166 break; 00167 } 00168 }
| views_plugin_display_attachment::options_summary | ( | &$ | categories, | |
| &$ | options | |||
| ) |
Provide the summary for attachment options in the views UI.
This output is returned as an array.
Reimplemented from views_plugin_display.
Definition at line 52 of file views_plugin_display_attachment.inc.
References views_object::$options, attachment_positions(), and views_plugin_display::get_option().
00052 { 00053 // It is very important to call the parent function here: 00054 parent::options_summary($categories, $options); 00055 00056 $categories['attachment'] = array( 00057 'title' => t('Attachment settings'), 00058 ); 00059 00060 $options['inherit_arguments'] = array( 00061 'category' => 'attachment', 00062 'title' => t('Inherit arguments'), 00063 'value' => $this->get_option('inherit_arguments') ? t('Yes') : t('No'), 00064 ); 00065 00066 $options['inherit_exposed_filters'] = array( 00067 'category' => 'attachment', 00068 'title' => t('Inherit exposed filters'), 00069 'value' => $this->get_option('inherit_exposed_filters') ? t('Yes') : t('No'), 00070 ); 00071 00072 $options['attachment_position'] = array( 00073 'category' => 'attachment', 00074 'title' => t('Position'), 00075 'value' => $this->attachment_positions($this->get_option('attachment_position')), 00076 ); 00077 00078 $displays = array_filter($this->get_option('displays')); 00079 if (count($displays) > 1) { 00080 $attach_to = t('Multiple displays'); 00081 } 00082 else if (count($displays) == 1) { 00083 $display = array_shift($displays); 00084 if (!empty($this->view->display[$display])) { 00085 $attach_to = check_plain($this->view->display[$display]->display_title); 00086 } 00087 } 00088 00089 if (!isset($attach_to)) { 00090 $attach_to = t('None'); 00091 } 00092 00093 $options['displays'] = array( 00094 'category' => 'attachment', 00095 'title' => t('Attach to'), 00096 'value' => $attach_to, 00097 ); 00098 }
| views_plugin::options_validate | ( | &$ | form, | |
| &$ | form_state | |||
| ) | [inherited] |
Validate the options form.
Reimplemented in views_plugin_access, and views_plugin_access_role.
Definition at line 338 of file plugins.inc.
| views_plugin_display::options_validate | ( | $ | form, | |
| &$ | form_state | |||
| ) | [inherited] |
Validate the options form.
Reimplemented in views_plugin_display_page.
Definition at line 1390 of file views_plugin_display.inc.
References views_plugin_display::get_access_plugin(), views_plugin_display::get_cache_plugin(), and views_plugin_display::get_plugin().
01390 { 01391 switch ($form_state['section']) { 01392 case 'style_options': 01393 $style = TRUE; 01394 case 'row_options': 01395 // if row, $style will be empty. 01396 $plugin = $this->get_plugin(empty($style) ? 'row' : 'style'); 01397 if ($plugin) { 01398 $plugin->options_validate($form[$form_state['section']], $form_state); 01399 } 01400 break; 01401 case 'access_options': 01402 $plugin = $this->get_access_plugin(); 01403 if ($plugin) { 01404 $plugin->options_validate($form['access_options'], $form_state); 01405 } 01406 break; 01407 case 'cache_options': 01408 $plugin = $this->get_cache_plugin(); 01409 if ($plugin) { 01410 $plugin->options_validate($form['cache_options'], $form_state); 01411 } 01412 break; 01413 } 01414 }
| views_plugin_display::override_option | ( | $ | option, | |
| $ | value | |||
| ) | [inherited] |
Set an option and force it to be an override.
Definition at line 581 of file views_plugin_display.inc.
References views_plugin_display::set_option(), and views_plugin_display::set_override().
00581 { 00582 $this->set_override($option, FALSE); 00583 $this->set_option($option, $value); 00584 }
| views_plugin_display::pre_execute | ( | ) | [inherited] |
Set up any variables on the view prior to execution.
These are separated from execute because they are extremely common and unlikely to be overridden on an individual display.
Definition at line 1759 of file views_plugin_display.inc.
References views_plugin_display::get_option(), views_plugin_display::use_ajax(), views_plugin_display::use_more(), and views_plugin_display::use_pager().
01759 { 01760 $this->view->set_use_ajax($this->use_ajax()); 01761 // Copy pager information from the display. 01762 $this->view->set_use_pager($this->use_pager()); 01763 $this->view->set_pager_element($this->get_option('pager_element')); 01764 $this->view->set_items_per_page($this->get_option('items_per_page')); 01765 $this->view->set_offset($this->get_option('offset')); 01766 if ($this->use_more()) { 01767 $this->view->get_total_rows = TRUE; 01768 } 01769 }
| views_plugin_display::preview | ( | ) | [inherited] |
Fully render the display for the purposes of a live preview or some other AJAXy reason.
Reimplemented in views_plugin_display_feed.
Definition at line 1783 of file views_plugin_display.inc.
01783 { return $this->view->render(); }
| views_plugin_display::query | ( | ) | [inherited] |
Inject anything into the query that the display handler needs.
Reimplemented from views_plugin.
Definition at line 1637 of file views_plugin_display.inc.
References views_plugin_display::get_option().
Referenced by views_plugin_display::render_more_link().
01637 { 01638 // Make the query distinct if the option was set. 01639 if ($this->get_option('distinct')) { 01640 $this->view->query->set_distinct(); 01641 } 01642 }
| views_plugin_display::render | ( | ) | [inherited] |
Render this display.
Reimplemented in views_plugin_display_feed.
Definition at line 1727 of file views_plugin_display.inc.
References views_plugin::theme_functions().
01727 { 01728 return theme($this->theme_functions(), $this->view); 01729 }
| views_plugin_display::render_empty | ( | ) | [inherited] |
Render the empty text of the view.
Definition at line 1713 of file views_plugin_display.inc.
References views_plugin_display::render_textarea().
01713 { return $this->render_textarea('empty'); }
| views_plugin_display::render_filters | ( | ) | [inherited] |
Not all display plugins will support filtering.
Definition at line 1647 of file views_plugin_display.inc.
| views_plugin_display::render_footer | ( | ) | [inherited] |
Render the footer of the view.
Definition at line 1704 of file views_plugin_display.inc.
References views_plugin_display::render_textarea().
01704 { 01705 if (!empty($this->view->result) || $this->get_option('footer_empty')) { 01706 return $this->render_textarea('footer'); 01707 } 01708 }
| views_plugin_display::render_header | ( | ) | [inherited] |
Render the header of the view.
Definition at line 1695 of file views_plugin_display.inc.
References views_plugin_display::render_textarea().
01695 { 01696 if (!empty($this->view->result) || $this->get_option('header_empty')) { 01697 return $this->render_textarea('header'); 01698 } 01699 }
| views_plugin_display::render_more_link | ( | ) | [inherited] |
Render the 'more' link.
Definition at line 1652 of file views_plugin_display.inc.
References views_plugin_display::get_path(), views_plugin_display::query(), views_plugin_display::use_more(), and views_plugin_display::use_more_text().
01652 { 01653 if ($this->use_more() && $this->view->total_rows > $this->view->pager['items_per_page']) { 01654 $path = $this->get_path(); 01655 if ($path) { 01656 $path = $this->view->get_url(NULL, $path); 01657 $url_options = array(); 01658 if (!empty($this->view->exposed_raw_input)) { 01659 $url_options['query'] = $this->view->exposed_raw_input; 01660 } 01661 $theme = views_theme_functions('views_more', $this->view, $this->display); 01662 $path = check_url(url($path, $url_options)); 01663 return theme($theme, $path, $this->use_more_text()); 01664 } 01665 } 01666 }
| views_plugin_display::render_textarea | ( | $ | area | ) | [inherited] |
Render a text area, using the proper format.
Definition at line 1671 of file views_plugin_display.inc.
References views_plugin_display::get_option().
Referenced by views_plugin_display::render_empty(), views_plugin_display::render_footer(), and views_plugin_display::render_header().
01671 { 01672 static $formats = array(); 01673 01674 $value = $this->get_option($area); 01675 // Check to make sure the filter format exists; if not, we don't 01676 // display anything. 01677 $format = filter_resolve_format($this->get_option($area . '_format')); 01678 01679 if (!array_key_exists($format, $formats)) { 01680 $formats[$format] = db_result(db_query("SELECT name FROM {filter_formats} WHERE format = %d", $format)); 01681 } 01682 01683 if (!$formats[$format]) { 01684 return; 01685 } 01686 01687 if ($value) { 01688 return check_markup($value, $format, FALSE); 01689 } 01690 }
| views_object::set_default_options | ( | ) | [inherited] |
Set default options.
For backward compatibility, it sends the options array; this is a feature that will likely disappear at some point.
Definition at line 53 of file base.inc.
References views_object::_set_option_defaults(), views_object::option_definition(), and views_object::options().
Referenced by views_object::construct().
00053 { 00054 $this->_set_option_defaults($this->options, $this->option_definition()); 00055 00056 // Retained for complex defaults plus backward compatibility. 00057 $this->options($this->options); 00058 }
| views_object::set_definition | ( | $ | definition | ) | [inherited] |
| views_plugin_display::set_option | ( | $ | option, | |
| $ | value | |||
| ) | [inherited] |
Intelligently set an option either from this display or from the default display, if directed to do so.
Definition at line 566 of file views_plugin_display.inc.
References views_plugin_display::is_defaulted(), and views_object::options().
Referenced by views_plugin_display_page::options_submit(), views_plugin_display_feed::options_submit(), views_plugin_display_block::options_submit(), options_submit(), views_plugin_display::options_submit(), and views_plugin_display::override_option().
00566 { 00567 if ($this->is_defaulted($option)) { 00568 return $this->default_display->set_option($option, $value); 00569 } 00570 00571 // Set this in two places: On the handler where we'll notice it 00572 // but also on the display object so it gets saved. This should 00573 // only be a temporary fix. 00574 $this->display->display_options[$option] = $value; 00575 return $this->options[$option] = $value; 00576 }
| views_plugin_display::set_override | ( | $ | section, | |
| $ | new_state = NULL | |||
| ) | [inherited] |
Flip the override setting for the given section.
Definition at line 1607 of file views_plugin_display.inc.
References views_object::$options, views_plugin_display::defaultable_sections(), views_plugin_display::get_option(), and views_object::options().
Referenced by views_plugin_display::options_override(), and views_plugin_display::override_option().
01607 { 01608 $options = $this->defaultable_sections($section); 01609 if (!$options) { 01610 return; 01611 } 01612 01613 if (!isset($new_state)) { 01614 $new_state = empty($this->options['defaults'][$section]); 01615 } 01616 01617 // For each option that is part of this group, fix our settings. 01618 foreach ($options as $option) { 01619 if ($new_state) { 01620 // Revert to defaults. 01621 unset($this->options[$option]); 01622 unset($this->display->display_options[$option]); 01623 } 01624 else { 01625 // copy existing values into our display. 01626 $this->options[$option] = $this->get_option($option); 01627 $this->display->display_options[$option] = $this->options[$option]; 01628 } 01629 $this->options['defaults'][$option] = $new_state; 01630 $this->display->display_options['defaults'][$option] = $new_state; 01631 } 01632 }
| views_plugin::theme_functions | ( | ) | [inherited] |
Provide a full list of possible theme templates used by this style.
Definition at line 353 of file plugins.inc.
Referenced by views_plugin_display::options_form(), views_plugin_style_summary::render(), views_plugin_style_rss::render(), views_plugin_style::render(), views_plugin_row::render(), views_plugin_display::render(), views_plugin_row_search_view::render(), views_plugin_row_comment_rss::render(), and views_plugin_row_aggregator_rss::render().
00353 { 00354 return views_theme_functions($this->definition['theme'], $this->view, $this->display); 00355 }
| views_object::unpack_options | ( | &$ | storage, | |
| $ | options, | |||
| $ | definition = NULL | |||
| ) | [inherited] |
Unpack options over our existing defaults, drilling down into arrays so that defaults don't get totally blown away.
Definition at line 79 of file base.inc.
References views_object::$options, and views_object::option_definition().
Referenced by views_plugin_style::init(), views_plugin_row::init(), views_plugin_display::init(), and views_handler::init().
00079 { 00080 if (!is_array($options)) { 00081 return; 00082 } 00083 00084 if (!isset($definition)) { 00085 $definition = $this->option_definition(); 00086 } 00087 00088 foreach ($options as $key => $value) { 00089 if (is_array($value)) { 00090 if (!isset($storage[$key]) || !is_array($storage[$key])) { 00091 $storage[$key] = array(); 00092 } 00093 00094 $this->unpack_options($storage[$key], $value, isset($definition[$key]) ? $definition[$key] : array()); 00095 } 00096 else if (!empty($definition[$key]['translatable']) && !empty($value)) { 00097 $storage[$key] = t($value); 00098 } 00099 else { 00100 $storage[$key] = $value; 00101 } 00102 } 00103 }
| views_plugin_display::use_ajax | ( | ) | [inherited] |
Does the display use AJAX?
Definition at line 105 of file views_plugin_display.inc.
References views_plugin_display::get_option().
Referenced by views_plugin_display::defaultable_sections(), views_plugin_display::option_definition(), views_plugin_display::options_form(), views_plugin_display::options_submit(), views_plugin_display::options_summary(), views_plugin_display::pre_execute(), and views_plugin_display_block::uses_exposed().
00105 { 00106 if (!empty($this->definition['use ajax'])) { 00107 return $this->get_option('use_ajax'); 00108 } 00109 return FALSE; 00110 }
| views_plugin_display::use_more | ( | ) | [inherited] |
Does the display have a more link enabled?
Definition at line 125 of file views_plugin_display.inc.
References views_plugin_display::get_option().
Referenced by views_plugin_display::defaultable_sections(), views_plugin_display::option_definition(), views_plugin_display::options_form(), views_plugin_display::options_submit(), views_plugin_display::options_summary(), views_plugin_display::pre_execute(), and views_plugin_display::render_more_link().
00125 { 00126 if (!empty($this->definition['use more'])) { 00127 return $this->get_option('use_more'); 00128 } 00129 return FALSE; 00130 }
| views_plugin_display::use_more_text | ( | ) | [inherited] |
Does the display have custom link text?
Definition at line 135 of file views_plugin_display.inc.
References views_plugin_display::get_option().
Referenced by views_plugin_display::defaultable_sections(), views_plugin_display::option_definition(), views_plugin_display::options_form(), views_plugin_display::options_submit(), and views_plugin_display::render_more_link().
00135 { 00136 if (!empty($this->definition['use more'])) { 00137 return $this->get_option('use_more_text'); 00138 } 00139 return FALSE; 00140 }
| views_plugin_display::use_pager | ( | ) | [inherited] |
Does the display have a pager enabled?
Definition at line 115 of file views_plugin_display.inc.
References views_plugin_display::get_option().
Referenced by views_plugin_display::defaultable_sections(), views_plugin_display::option_definition(), views_plugin_display::options_form(), views_plugin_display::options_submit(), views_plugin_display::options_summary(), and views_plugin_display::pre_execute().
00115 { 00116 if (!empty($this->definition['use pager'])) { 00117 return $this->get_option('use_pager'); 00118 } 00119 return FALSE; 00120 }
| views_plugin_display::uses_breadcrumb | ( | ) | [inherited] |
Check to see if the display needs a breadcrumb.
By default, displays do not need breadcrumbs
Reimplemented in views_plugin_display_feed, and views_plugin_display_page.
Definition at line 437 of file views_plugin_display.inc.
| views_plugin_display_attachment::uses_exposed | ( | ) |
Attachment displays only use exposed widgets if they are set to inherit the exposed filter settings of their parent display.
Reimplemented from views_plugin_display.
Definition at line 213 of file views_plugin_display_attachment.inc.
References views_object::options().
00213 { 00214 if (!empty($this->options['inherit_exposed_filters']) && parent::uses_exposed()) { 00215 return TRUE; 00216 } 00217 return FALSE; 00218 }
| views_plugin_display::uses_fields | ( | ) | [inherited] |
Determine if the display's style uses fields.
Definition at line 467 of file views_plugin_display.inc.
References views_plugin_display::get_plugin().
Referenced by views_plugin_display::options_form(), and views_plugin_display::validate().
00467 { 00468 $plugin = $this->get_plugin(); 00469 if ($plugin) { 00470 return $plugin->uses_fields(); 00471 } 00472 }
| views_plugin_display::uses_link_display | ( | ) | [inherited] |
Check to see if the display has some need to link to another display.
For the most part, displays without a path will use a link display. However, sometimes displays that have a path might also need to link to another display. This is true for feeds.
Definition at line 393 of file views_plugin_display.inc.
References views_plugin_display::has_path().
Referenced by views_plugin_display::options_summary().
00393 { return !$this->has_path(); }
| views_plugin_display::validate | ( | ) | [inherited] |
Make sure the display and all associated handlers are valid.
Reimplemented from views_plugin.
Reimplemented in views_plugin_display_page.
Definition at line 1797 of file views_plugin_display.inc.
References $field, views_plugin_display::get_handlers(), views_plugin_display::get_option(), views_plugin_display::get_plugin(), views_plugin_display::has_path(), views_plugin_display::is_defaulted(), views_object::options(), views_plugin_display::uses_fields(), and views_object_types().
01797 { 01798 $errors = array(); 01799 // Make sure displays that use fields HAVE fields. 01800 if ($this->uses_fields()) { 01801 $fields = FALSE; 01802 foreach ($this->get_handlers('field') as $field) { 01803 if (empty($field->options['exclude'])) { 01804 $fields = TRUE; 01805 } 01806 } 01807 01808 if (!$fields) { 01809 $errors[] = t('Display "@display" uses fields but there are none defined for it or all are excluded.', array('@display' => $this->display->display_title)); 01810 } 01811 } 01812 01813 if ($this->has_path() && !$this->get_option('path')) { 01814 $errors[] = t('Display "@display" uses a path but the path is undefined.', array('@display' => $this->display->display_title)); 01815 } 01816 01817 // Validate style plugin 01818 $style = $this->get_plugin(); 01819 if (empty($style)) { 01820 $errors[] = t('Display "@display" has an invalid style plugin.', array('@display' => $this->display->display_title)); 01821 } 01822 else { 01823 $result = $style->validate(); 01824 if (!empty($result) && is_array($result)) { 01825 $errors = array_merge($errors, $result); 01826 } 01827 } 01828 01829 // Validate handlers 01830 foreach (views_object_types() as $type => $info) { 01831 $plural = $info['plural']; 01832 // Skip handlers which are defaulted as there is no point in 01833 // validating them again. 01834 if (!$this->is_defaulted($plural)) { 01835 foreach ($this->get_handlers($type) as $handler) { 01836 $result = $handler->validate(); 01837 if (!empty($result) && is_array($result)) { 01838 $errors = array_merge($errors, $result); 01839 } 01840 } 01841 } 01842 } 01843 01844 return $errors; 01845 }
| views_plugin_display::view_special_blocks | ( | $ | type | ) | [inherited] |
Render any special blocks provided for this display.
Definition at line 1864 of file views_plugin_display.inc.
01864 { 01865 if ($type == '-exp') { 01866 // avoid interfering with the admin forms. 01867 if (arg(0) == 'admin' && arg(1) == 'build' && arg(2) == 'views') { 01868 return; 01869 } 01870 $this->view->init_handlers(); 01871 return array( 01872 'content' => $this->view->render_exposed_form(TRUE), 01873 ); 01874 } 01875 }
views_object::$options = array() [inherited] |
Except for displays, options for the object will be held here.
Definition at line 16 of file base.inc.
Referenced by views_plugin_display::_set_option_defaults(), views_object::_set_option_defaults(), views_handler_filter_string::admin_summary(), views_handler_filter_numeric::admin_summary(), views_handler_argument::default_argument_form(), views_handler_filter_term_node_tid::extra_options_form(), views_plugin_display::get_plugin(), views_handler_filter_node_type::get_value_options(), views_plugin_style::init(), views_plugin_row::init(), views_plugin_display::init(), views_handler_field_upload_description::init(), views_handler_field_term_node_tid::init(), views_handler_field_file::init(), views_plugin_row_node_view::init(), views_handler_field_history_user_timestamp::init(), views_handler_field_comment::init(), views_handler::init(), views_handler_relationship::init(), views_handler_filter_many_to_one::init(), views_handler_filter::init(), views_handler_field::init(), views_handler_argument_string::init(), views_handler_argument_many_to_one::init(), views_handler_argument::init(), views_handler_filter::operator_form(), views_handler_filter_string::operator_options(), views_handler_filter_numeric::operator_options(), views_handler_filter_in_operator::operator_options(), views_handler_filter_string::operator_values(), views_handler_filter_numeric::operator_values(), views_handler_filter_in_operator::operator_values(), views_plugin_cache_time::option_defaults(), views_plugin_access_role::option_defaults(), views_plugin_access_perm::option_defaults(), views_plugin_style_table::option_definition(), views_plugin_style_summary_unformatted::option_definition(), views_plugin_style_summary::option_definition(), views_plugin_style_rss::option_definition(), views_plugin_style_list::option_definition(), views_plugin_style_grid::option_definition(), views_plugin_style::option_definition(), views_plugin_row_fields::option_definition(), views_plugin_row::option_definition(), views_plugin_display_page::option_definition(), views_plugin_display_feed::option_definition(), views_plugin_display_block::option_definition(), option_definition(), views_plugin_display::option_definition(), views_handler_field_user_name::option_definition(), views_handler_field_user_mail::option_definition(), views_handler_field_user_link::option_definition(), views_handler_field_user::option_definition(), views_handler_field_upload_fid::option_definition(), views_handler_field_upload_description::option_definition(), views_handler_relationship_translation::option_definition(), views_handler_filter_node_tnid::option_definition(), views_handler_filter_term_node_tid_depth::option_definition(), views_handler_filter_term_node_tid::option_definition(), views_handler_field_term_node_tid::option_definition(), views_handler_field_taxonomy::option_definition(), views_handler_argument_term_node_tid_depth::option_definition(), views_handler_argument_term_node_tid::option_definition(), views_handler_field_file::option_definition(), views_handler_field_accesslog_path::option_definition(), views_plugin_row_search_view::option_definition(), views_handler_filter_search::option_definition(), views_handler_field_search_score::option_definition(), views_plugin_row_node_view::option_definition(), views_plugin_row_node_rss::option_definition(), views_handler_field_node_link::option_definition(), views_handler_field_node::option_definition(), views_handler_field_history_user_timestamp::option_definition(), views_handler_field_locale_link_edit::option_definition(), views_handler_field_contact_link::option_definition(), views_plugin_row_comment_view::option_definition(), views_handler_field_node_new_comments::option_definition(), views_handler_field_ncs_last_comment_name::option_definition(), views_handler_field_comment_username::option_definition(), views_handler_field_comment_node_link::option_definition(), views_handler_field_comment_link::option_definition(), views_handler_field_comment::option_definition(), views_plugin_row_aggregator_rss::option_definition(), views_handler_field_aggregator_title_link::option_definition(), views_handler_field_aggregator_category::option_definition(), views_handler_sort_date::option_definition(), views_handler_sort::option_definition(), views_handler_relationship::option_definition(), views_handler_filter_string::option_definition(), views_handler_filter_numeric::option_definition(), views_handler_filter_many_to_one::option_definition(), views_handler_filter_in_operator::option_definition(), views_handler_filter_date::option_definition(), views_handler_filter_boolean_operator::option_definition(), views_handler_filter::option_definition(), views_handler_field_url::option_definition(), views_handler_field_prerender_list::option_definition(), views_handler_field_numeric::option_definition(), views_handler_field_date::option_definition(), views_handler_field_custom::option_definition(), views_handler_field_boolean::option_definition(), views_handler_field_file_size::option_definition(), views_handler_field::option_definition(), views_handler_argument_string::option_definition(), views_handler_argument_numeric::option_definition(), views_handler_argument_null::option_definition(), views_handler_argument_many_to_one::option_definition(), views_handler_argument::option_definition(), views_plugin_style_default::options(), views_plugin_style::options_form(), views_plugin_row_fields::options_form(), views_plugin_display::options_form(), views_plugin_cache_time::options_form(), views_handler_relationship_translation::options_form(), views_handler_field_term_node_tid::options_form(), views_handler_field_search_score::options_form(), views_plugin_row_node_view::options_form(), views_handler_field::options_form(), views_handler_argument::options_form(), views_plugin_display_page::options_summary(), views_plugin_display_feed::options_summary(), views_plugin_display_block::options_summary(), options_summary(), views_plugin_display::options_summary(), views_handler_filter_in_operator::reduce_value_options(), views_plugin_display::set_override(), views_object::unpack_options(), views_plugin_argument_validate_taxonomy_term::validate_form(), views_plugin_argument_validate_node::validate_form(), views_handler_filter_term_node_tid::value_form(), and views_handler_filter_in_operator::value_form().
1.4.7