Drupal 8  8.0.2
BulkForm Class Reference
Inheritance diagram for BulkForm:

Public Member Functions

 __construct (array $configuration, $plugin_id, $plugin_definition, EntityManagerInterface $entity_manager, LanguageManagerInterface $language_manager)
 
 init (ViewExecutable $view, DisplayPluginBase $display, array &$options=NULL)
 
 getCacheMaxAge ()
 
 getCacheContexts ()
 
 getCacheTags ()
 
 getEntityTypeId ()
 
 buildOptionsForm (&$form, FormStateInterface $form_state)
 
 validateOptionsForm (&$form, FormStateInterface $form_state)
 
 preRender (&$values)
 
 getValue (ResultRow $row, $field=NULL)
 
 viewsForm (&$form, FormStateInterface $form_state)
 
 viewsFormSubmit (&$form, FormStateInterface $form_state)
 
 viewsFormValidate (&$form, FormStateInterface $form_state)
 
 query ()
 
 clickSortable ()
 
- Public Member Functions inherited from FieldPluginBase
 init (ViewExecutable $view, DisplayPluginBase $display, array &$options=NULL)
 
 query ()
 
 clickSort ($order)
 
 clickSortable ()
 
 label ()
 
 elementType ($none_supported=FALSE, $default_empty=FALSE, $inline=FALSE)
 
 elementLabelType ($none_supported=FALSE, $default_empty=FALSE)
 
 elementWrapperType ($none_supported=FALSE, $default_empty=FALSE)
 
 getElements ()
 
 elementClasses ($row_index=NULL)
 
 tokenizeValue ($value, $row_index=NULL)
 
 elementLabelClasses ($row_index=NULL)
 
 elementWrapperClasses ($row_index=NULL)
 
 getEntity (ResultRow $values)
 
 getValue (ResultRow $values, $field=NULL)
 
 useStringGroupBy ()
 
 submitOptionsForm (&$form, FormStateInterface $form_state)
 
 buildOptionsForm (&$form, FormStateInterface $form_state)
 
 adminSummary ()
 
 preRender (&$values)
 
 render (ResultRow $values)
 
 postRender (ResultRow $row, $output)
 
 advancedRender (ResultRow $values)
 
 isValueEmpty ($value, $empty_zero, $no_skip_empty=TRUE)
 
 renderText ($alter)
 
 theme (ResultRow $values)
 
 themeFunctions ()
 
 adminLabel ($short=FALSE)
 
- Public Member Functions inherited from HandlerBase
 __construct (array $configuration, $plugin_id, $plugin_definition)
 
 init (ViewExecutable $view, DisplayPluginBase $display, array &$options=NULL)
 
 adminLabel ($short=FALSE)
 
 getField ($field=NULL)
 
 sanitizeValue ($value, $type=NULL)
 
 buildOptionsForm (&$form, FormStateInterface $form_state)
 
 setModuleHandler (ModuleHandlerInterface $module_handler)
 
 usesGroupBy ()
 
 buildGroupByForm (&$form, FormStateInterface $form_state)
 
 submitGroupByForm (&$form, FormStateInterface $form_state)
 
 hasExtraOptions ()
 
 defineExtraOptions (&$option)
 
 buildExtraOptionsForm (&$form, FormStateInterface $form_state)
 
 validateExtraOptionsForm ($form, FormStateInterface $form_state)
 
 submitExtraOptionsForm ($form, FormStateInterface $form_state)
 
 canExpose ()
 
 defaultExposeOptions ()
 
 exposedInfo ()
 
 buildExposedForm (&$form, FormStateInterface $form_state)
 
 validateExposed (&$form, FormStateInterface $form_state)
 
 submitExposed (&$form, FormStateInterface $form_state)
 
 buildExposeForm (&$form, FormStateInterface $form_state)
 
 validateExposeForm ($form, FormStateInterface $form_state)
 
 submitExposeForm ($form, FormStateInterface $form_state)
 
 showExposeButton (&$form, FormStateInterface $form_state)
 
 showExposeForm (&$form, FormStateInterface $form_state)
 
 access (AccountInterface $account)
 
 preQuery ()
 
 query ()
 
 postExecute (&$values)
 
 setRelationship ()
 
 ensureMyTable ()
 
 adminSummary ()
 
 isExposed ()
 
 isAGroup ()
 
 multipleExposedInput ()
 
 acceptExposedInput ($input)
 
 storeExposedInput ($input, $status)
 
 getJoin ()
 
 validate ()
 
 broken ()
 
 getDateFormat ($format)
 
 getDateField ()
 
 setViewsData (ViewsData $views_data)
 
 getEntityType ()
 
 displayExposedForm ($form, FormStateInterface $form_state)
 
 submitTemporaryForm ($form, FormStateInterface $form_state)
 
- 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 FieldHandlerInterface
 getRenderTokens ($item)
 

Static Public Member Functions

static create (ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition)
 
- Static Public Member Functions inherited from FieldPluginBase
static trimText ($alter, $value)
 
- Static Public Member Functions inherited from HandlerBase
static getTableJoin ($table, $base_table)
 
static breakString ($str, $force_int=FALSE)
 
- 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

 getEntityManager ()
 
 getLanguageManager ()
 
 getView ()
 
 defineOptions ()
 
 getBulkOptions ($filtered=TRUE)
 
 emptySelectedMessage ()
 
 drupalSetMessage ($message=NULL, $type= 'status', $repeat=FALSE)
 
 calculateEntityBulkFormKey (EntityInterface $entity, $use_revision)
 
 loadEntityFromBulkFormKey ($bulk_form_key)
 
- Protected Member Functions inherited from FieldPluginBase
 allowAdvancedRender ()
 
 addAdditionalFields ($fields=NULL)
 
 defineOptions ()
 
 getPreviousFieldLabels ()
 
 renderAltered ($alter, $tokens)
 
 renderTrimText ($alter, $value)
 
 renderAsLink ($alter, $text, $tokens)
 
 getFieldTokenPlaceholder ()
 
 getTokenValuesRecursive (array $array, array $parent_keys=array())
 
 addSelfTokens (&$tokens, $item)
 
 documentSelfTokens (&$tokens)
 
 linkGenerator ()
 
 getRenderer ()
 
- Protected Member Functions inherited from HandlerBase
 defineOptions ()
 
 caseTransform ($string, $option)
 
 getModuleHandler ()
 
 placeholder ()
 
 getViewsData ()
 
- 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

 $entityManager
 
 $actionStorage
 
 $actions = array()
 
 $languageManager
 
- Protected Attributes inherited from FieldPluginBase
 $linkGenerator
 
 $renderer
 
- Protected Attributes inherited from HandlerBase
 $moduleHandler
 
 $viewsData
 
- Protected Attributes inherited from PluginBase
 $usesOptions = FALSE
 
 $renderer
 

Additional Inherited Members

- Data Fields inherited from FieldPluginBase
const RENDER_TEXT_PHASE_SINGLE_ITEM = 0
 
const RENDER_TEXT_PHASE_COMPLETELY = 1
 
const RENDER_TEXT_PHASE_EMPTY = 2
 
 $field_alias = 'unknown'
 
 $aliases = array()
 
 $original_value = NULL
 
 $additional_fields = array()
 
- Data Fields inherited from HandlerBase
 $query = NULL
 
 $table
 
 $tableAlias
 
 $actualTable
 
 $realField
 
 $field
 
 $actualField
 
 $relationship = NULL
 
- 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
 

Detailed Description

Defines a actions-based bulk operation form element.

("bulk_form")

Constructor & Destructor Documentation

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

Constructs a new BulkForm object.

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.
\Drupal\Core\Language\LanguageManagerInterface$language_managerThe language manager.

References Drupal\entityManager(), and Drupal\languageManager().

Here is the call graph for this function:

Member Function Documentation

buildOptionsForm ( $form,
FormStateInterface  $form_state 
)

{}

References BulkForm\getBulkOptions(), and t().

Here is the call graph for this function:

calculateEntityBulkFormKey ( EntityInterface  $entity,
  $use_revision 
)
protected

Calculates a bulk form key.

This generates a key that is used as the checkbox return value when submitting a bulk form. This key allows the entity for the row to be loaded totally independently of the executed view row.

Parameters
\Drupal\Core\Entity\EntityInterface$entityThe entity to calculate a bulk form key for.
bool$use_revisionWhether the revision id should be added to the bulk form key. This should be set to TRUE only if the view is listing entity revisions.
Returns
string The bulk form key representing the entity's id, language and revision (if applicable) as one string.
See Also
self::loadEntityFromBulkFormKey()

Referenced by BulkForm\viewsForm().

Here is the caller graph for this function:

clickSortable ( )

{Determines if this field is click sortable.

Returns
bool The value of 'click sortable' from the plugin definition, this defaults to TRUE if not set.
}

Implements FieldHandlerInterface.

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:

drupalSetMessage (   $message = NULL,
  $type = 'status',
  $repeat = FALSE 
)
protected

Wraps drupal_set_message().

Referenced by BulkForm\viewsFormSubmit().

Here is the caller graph for this function:

emptySelectedMessage ( )
protected

Returns the message to be displayed when there are no selected items.

Returns
string Message displayed when no items are selected.

References t().

Referenced by BulkForm\viewsFormValidate().

Here is the call graph for this function:

Here is the caller graph for this function:

getBulkOptions (   $filtered = TRUE)
protected

Returns the available operations for this form.

Parameters
bool$filtered(optional) Whether to filter actions to selected actions.
Returns
array An associative array of operations, suitable for a select element.

Referenced by BulkForm\buildOptionsForm(), and BulkForm\viewsForm().

Here is the caller graph for this function:

getCacheContexts ( )

{The cache contexts associated with this object.These identify a specific variation/representation of the object.Cache contexts are tokens: placeholders that are converted to cache keys by the service. The replacement value depends on the request context (the current URL, language, and so on). They're converted before storing an object in cache.

Returns
string[] An array of cache context tokens, used to generate a cache ID.
See Also
::convertTokensToKeys()
}

Implements CacheableDependencyInterface.

References Drupal\languageManager().

Here is the call graph for this function:

getCacheMaxAge ( )

{The maximum age for which this object may be cached.

Returns
int The maximum time in seconds that this object may be cached.
}

Implements CacheableDependencyInterface.

getCacheTags ( )

{The cache tags associated with this object.When this object is modified, these cache tags will be invalidated.

Returns
string[] A set of cache tags.
}

Implements CacheableDependencyInterface.

getEntityManager ( )
protected

{}

getEntityTypeId ( )

{}

References HandlerBase\getEntityType().

Here is the call graph for this function:

getLanguageManager ( )
protected

{}

getValue ( ResultRow  $row,
  $field = NULL 
)

{}

getView ( )
protected

{}

init ( ViewExecutable  $view,
DisplayPluginBase  $display,
array &  $options = NULL 
)

{}

References HandlerBase\getEntityType().

Here is the call graph for this function:

loadEntityFromBulkFormKey (   $bulk_form_key)
protected

Loads an entity based on a bulk form key.

Parameters
string$bulk_form_keyThe bulk form key representing the entity's id, language and revision (if applicable) as one string.
Returns
The entity loaded in the state (language, optionally revision) specified as part of the bulk form key.

References Drupal\entityManager(), and HandlerBase\getEntityType().

Referenced by BulkForm\viewsFormSubmit().

Here is the call graph for this function:

Here is the caller graph for this function:

preRender ( $values)

{Runs before any fields are rendered.This gives the handlers some time to set up before any handler has been rendered.

Parameters
\Drupal\views\ResultRow[]$values An array of all ResultRow objects returned from the query.
}

Implements FieldHandlerInterface.

query ( )

{Add anything to the query that we might need to.}

Implements ViewsPluginInterface.

References Drupal\languageManager().

Here is the call graph for this function:

validateOptionsForm ( $form,
FormStateInterface  $form_state 
)

{}

viewsForm ( $form,
FormStateInterface  $form_state 
)

Form constructor for the bulk form.

Parameters
array$formAn associative array containing the structure of the form.
\Drupal\Core\Form\FormStateInterface$form_stateThe current state of the form.

References BulkForm\calculateEntityBulkFormKey(), BulkForm\getBulkOptions(), FieldPluginBase\getEntity(), and t().

Here is the call graph for this function:

viewsFormSubmit ( $form,
FormStateInterface  $form_state 
)

Submit handler for the bulk form.

Parameters
array$formAn associative array containing the structure of the form.
\Drupal\Core\Form\FormStateInterface$form_stateThe current state of the form.
Exceptions
\Symfony\Component\HttpKernel\Exception\AccessDeniedHttpExceptionThrown when the user tried to access an action without access to it.

References BulkForm\drupalSetMessage(), BulkForm\loadEntityFromBulkFormKey(), and t().

Here is the call graph for this function:

viewsFormValidate ( $form,
FormStateInterface  $form_state 
)

{}

References BulkForm\emptySelectedMessage().

Here is the call graph for this function:


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