Drupal 8  8.0.2
Block Class Reference
Inheritance diagram for Block:

Public Member Functions

 __construct (array $configuration, $plugin_id, $plugin_definition, EntityManagerInterface $entity_manager)
 
 blockSettings (array $settings)
 
 execute ()
 
 optionsSummary (&$categories, &$options)
 
 buildOptionsForm (&$form, FormStateInterface $form_state)
 
 submitOptionsForm (&$form, FormStateInterface $form_state)
 
 blockForm (ViewsBlock $block, array &$form, FormStateInterface $form_state)
 
 blockValidate (ViewsBlock $block, array $form, FormStateInterface $form_state)
 
 blockSubmit (ViewsBlock $block, $form, FormStateInterface $form_state)
 
 preBlockBuild (ViewsBlock $block)
 
 usesExposed ()
 
 remove ()
 
- Public Member Functions inherited from DisplayPluginBase
 __construct (array $configuration, $plugin_id, $plugin_definition)
 
 destroy ()
 
 isDefaultDisplay ()
 
 usesExposed ()
 
 displaysExposed ()
 
 usesAJAX ()
 
 ajaxEnabled ()
 
 isEnabled ()
 
 usesPager ()
 
 isPagerEnabled ()
 
 usesMore ()
 
 isMoreEnabled ()
 
 useGroupBy ()
 
 useMoreAlways ()
 
 useMoreText ()
 
 acceptAttachments ()
 
 usesAttachments ()
 
 usesAreas ()
 
 attachTo (ViewExecutable $view, $display_id, array &$build)
 
 defaultableSections ($section=NULL)
 
 hasPath ()
 
 usesLinkDisplay ()
 
 usesExposedFormInBlock ()
 
 getAttachedDisplays ()
 
 getLinkDisplay ()
 
 getPath ()
 
 getRoutedDisplay ()
 
 getUrl ()
 
 isDefaulted ($option)
 
 getOption ($option)
 
 usesFields ()
 
 getPlugin ($type)
 
getHandler ($type, $id)
 
getHandlers ($type)
 
 calculateDependencies ()
 
 getFieldLabels ($groupable_only=FALSE)
 
 setOption ($option, $value)
 
 overrideOption ($option, $value)
 
 optionLink ($text, $section, $class= '', $title= '')
 
 getArgumentsTokens ()
 
 optionsSummary (&$categories, &$options)
 
 buildOptionsForm (&$form, FormStateInterface $form_state)
 
 validateOptionsForm (&$form, FormStateInterface $form_state)
 
 optionsOverride ($form, FormStateInterface $form_state)
 
 setOverride ($section, $new_state=NULL)
 
 query ()
 
 renderFilters ()
 
 renderPager ()
 
 renderMoreLink ()
 
 render ()
 
 elementPreRender (array $element)
 
 renderArea ($area, $empty=FALSE)
 
 preExecute ()
 
 getCacheMetadata ()
 
 execute ()
 
 buildRenderable (array $args=[], $cache=TRUE)
 
 preview ()
 
 getType ()
 
 validate ()
 
 newDisplay ()
 
 isIdentifierUnique ($id, $identifier)
 
 outputIsEmpty ()
 
 getSpecialBlocks ()
 
 viewExposedFormBlocks ()
 
 getArgumentText ()
 
 getPagerText ()
 
 mergeDefaults ()
 
 remove ()
 
 getExtenders ()
 
- Public Member Functions inherited from PluginBase
 __construct (array $configuration, $plugin_id, $plugin_definition)
 
 init (ViewExecutable $view, DisplayPluginBase $display, array &$options=NULL)
 
 filterByDefinedOptions (array &$storage)
 
 unpackOptions (&$storage, $options, $definition=NULL, $all=TRUE, $check=TRUE)
 
 destroy ()
 
 buildOptionsForm (&$form, FormStateInterface $form_state)
 
 validateOptionsForm (&$form, FormStateInterface $form_state)
 
 submitOptionsForm (&$form, FormStateInterface $form_state)
 
 query ()
 
 themeFunctions ()
 
 validate ()
 
 summaryTitle ()
 
 pluginTitle ()
 
 usesOptions ()
 
 globalTokenReplace ($string= '', array $options=array())
 
 getAvailableGlobalTokens ($prepared=FALSE, array $types=array())
 
 globalTokenForm (&$form, FormStateInterface $form_state)
 
 calculateDependencies ()
 
 getProvider ()
 
- Public Member Functions inherited from PluginInspectionInterface
 getPluginId ()
 
 getPluginDefinition ()
 
- Public Member Functions inherited from DerivativeInspectionInterface
 getBaseId ()
 
 getDerivativeId ()
 
- Public Member Functions inherited from DisplayPluginInterface
 initDisplay (ViewExecutable $view, array &$display, array &$options=NULL)
 
 access (AccountInterface $account=NULL)
 
 calculateCacheMetadata ()
 

Static Public Member Functions

static create (ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition)
 
- Static Public Member Functions inherited from DisplayPluginBase
static buildBasicRenderable ($view_id, $display_id, array $args=[])
 
- Static Public Member Functions inherited from PluginBase
static create (ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition)
 
static preRenderAddFieldsetMarkup (array $form)
 
static preRenderFlattenData ($form)
 
static queryLanguageSubstitutions ()
 

Protected Member Functions

 defineOptions ()
 
- Protected Member Functions inherited from DisplayPluginBase
 defineOptions ()
 
 getAllHandlers ($only_overrides=FALSE)
 
 getAllPlugins ($only_overrides=FALSE)
 
 mergePlugin ($type)
 
 mergeHandler ($type)
 
 buildRenderingLanguageOptions ()
 
 isBaseTableTranslatable ()
 
- Protected Member Functions inherited from PluginBase
 defineOptions ()
 
 setOptionDefaults (array &$storage, array $options)
 
 doFilterByDefinedOptions (array &$storage, array $options)
 
 viewsTokenReplace ($text, $tokens)
 
 listLanguages ($flags=LanguageInterface::STATE_ALL, array $current_values=NULL)
 
 getRenderer ()
 

Protected Attributes

 $usesAttachments = TRUE
 
 $entityManager
 
- Protected Attributes inherited from DisplayPluginBase
 $plugins = array()
 
 $extenders = []
 
 $usesOptions = TRUE
 
 $usesAJAX = TRUE
 
 $usesPager = TRUE
 
 $usesMore = TRUE
 
 $usesAttachments = FALSE
 
 $usesAreas = TRUE
 
- Protected Attributes inherited from PluginBase
 $usesOptions = FALSE
 
 $renderer
 

Additional Inherited Members

- Data Fields inherited from DisplayPluginBase
 $view = NULL
 
 $handlers = []
 
 $output = NULL
 
 $display
 
- Data Fields inherited from PluginBase
const INCLUDE_NEGOTIATED = 16
 
const INCLUDE_ENTITY = 32
 
const VIEWS_QUERY_LANGUAGE_SITE_DEFAULT = '***LANGUAGE_site_default***'
 
 $options = array()
 
 $view = NULL
 
 $displayHandler
 
 $definition
 
- Static Protected Attributes inherited from DisplayPluginBase
static $unpackOptions = array()
 

Detailed Description

The plugin that handles a block.

( id = "block", title = ("Block"), help = ("Display the view as a block."), theme = "views_view", register_theme = FALSE, uses_hook_block = TRUE, contextual_links_locations = {"block"}, admin = ("Block") )

See Also

Constructor & Destructor Documentation

__construct ( array  $configuration,
  $plugin_id,
  $plugin_definition,
EntityManagerInterface  $entity_manager 
)

Constructs a new Block instance.

Parameters
array$configurationA configuration array containing information about the plugin instance.
string$plugin_idThe plugin_id for the plugin instance.
mixed$plugin_definitionThe plugin implementation definition.
\Drupal\Core\Entity\EntityManagerInterface$entity_managerThe entity manager.

References Drupal\entityManager().

Here is the call graph for this function:

Member Function Documentation

blockForm ( ViewsBlock  $block,
array &  $form,
FormStateInterface  $form_state 
)

Adds the configuration form elements specific to this views block plugin.

This method allows block instances to override the views items_per_page.

Parameters
\Drupal\views\Plugin\Block\ViewsBlock$blockThe ViewsBlock plugin.
array$formThe form definition array for the block configuration form.
\Drupal\Core\Form\FormStateInterface$form_stateThe current state of the form.
Returns
array $form The renderable form array representing the entire configuration form.
See Also
::blockForm()

References ViewsBlock\getConfiguration(), DisplayPluginBase\getOption(), DisplayPluginBase\getPlugin(), and t().

Here is the call graph for this function:

blockSettings ( array  $settings)

Returns plugin-specific settings for the block.

Parameters
array$settingsThe settings of the block.
Returns
array An array of block-specific settings to override the defaults provided in ::defaultConfiguration().
See Also
::defaultConfiguration()
blockSubmit ( ViewsBlock  $block,
  $form,
FormStateInterface  $form_state 
)

Handles form submission for the views block configuration form.

Parameters
\Drupal\views\Plugin\Block\ViewsBlock$blockThe ViewsBlock plugin.
array$formThe form definition array for the full block configuration form.
\Drupal\Core\Form\FormStateInterface$form_stateThe current state of the form.
  • See Also
    ::blockSubmit()

References FormStateInterface\getValue(), BlockBase\setConfigurationValue(), and FormStateInterface\unsetValue().

Here is the call graph for this function:

blockValidate ( ViewsBlock  $block,
array  $form,
FormStateInterface  $form_state 
)

Handles form validation for the views block configuration form.

Parameters
\Drupal\views\Plugin\Block\ViewsBlock$blockThe ViewsBlock plugin.
array$formThe form definition array for the block configuration form.
\Drupal\Core\Form\FormStateInterface$form_stateThe current state of the form.
See Also
::blockValidate()
buildOptionsForm ( $form,
FormStateInterface  $form_state 
)

Provide the default form for setting options.

Implements DisplayPluginInterface.

References FormStateInterface\get(), DisplayPluginBase\getOption(), t(), Drupal\url(), and Block\usesExposed().

Here is the call graph for this function:

static create ( ContainerInterface  $container,
array  $configuration,
  $plugin_id,
  $plugin_definition 
)
static

{Creates an instance of the plugin.

Parameters
\Symfony\Component\DependencyInjection\ContainerInterface$containerThe container to pull out services used in the plugin.
array$configurationA configuration array containing information about the plugin instance.
string$plugin_idThe plugin ID for the plugin instance.
mixed$plugin_definitionThe plugin implementation definition.
Returns
static Returns an instance of this plugin.
}

Implements ContainerFactoryPluginInterface.

defineOptions ( )
protected

{}

References t().

Here is the call graph for this function:

execute ( )

The display block handler returns the structure necessary for a block.

Implements DisplayPluginInterface.

References DisplayPluginBase\getOption(), and DisplayPluginBase\outputIsEmpty().

Here is the call graph for this function:

optionsSummary ( $categories,
$options 
)

Provide the summary for page options in the views UI.

This output is returned as an array.

Implements DisplayPluginInterface.

References DisplayPluginBase\getOption(), and t().

Here is the call graph for this function:

preBlockBuild ( ViewsBlock  $block)

Allows to change the display settings right before executing the block.

Parameters
\Drupal\views\Plugin\Block\ViewsBlock$blockThe block plugin for views displays.

References ViewsBlock\getConfiguration().

Here is the call graph for this function:

remove ( )

{Reacts on deleting a display.}

Implements DisplayPluginInterface.

References Drupal\entityManager().

Here is the call graph for this function:

submitOptionsForm ( $form,
FormStateInterface  $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.

Implements DisplayPluginInterface.

References FormStateInterface\get(), FormStateInterface\getValue(), and DisplayPluginBase\setOption().

Here is the call graph for this function:

usesExposed ( )

Block views use exposed widgets only if AJAX is set.

Implements DisplayPluginInterface.

References DisplayPluginBase\ajaxEnabled().

Referenced by Block\buildOptionsForm().

Here is the call graph for this function:

Here is the caller graph for this function:


The documentation for this class was generated from the following file: