You are here

interface MultiItemsFieldHandlerInterface in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/views/src/Plugin/views/field/MultiItemsFieldHandlerInterface.php \Drupal\views\Plugin\views\field\MultiItemsFieldHandlerInterface
  2. 10 core/modules/views/src/Plugin/views/field/MultiItemsFieldHandlerInterface.php \Drupal\views\Plugin\views\field\MultiItemsFieldHandlerInterface

Defines a field handler which renders multiple items per row.

Hierarchy

Expanded class hierarchy of MultiItemsFieldHandlerInterface

All classes that implement MultiItemsFieldHandlerInterface

File

core/modules/views/src/Plugin/views/field/MultiItemsFieldHandlerInterface.php, line 10

Namespace

Drupal\views\Plugin\views\field
View source
interface MultiItemsFieldHandlerInterface extends FieldHandlerInterface {

  /**
   * Renders a single item of a row.
   *
   * @param int $count
   *   The index of the item inside the row.
   * @param mixed $item
   *   The item for the field to render.
   *
   * @return string
   *   The rendered output.
   */
  public function render_item($count, $item);

  /**
   * Gets an array of items for the field.
   *
   * @param \Drupal\views\ResultRow $values
   *   The result row object containing the values.
   *
   * @return array
   *   An array of items for the field.
   */
  public function getItems(ResultRow $values);

  /**
   * Render all items in this field together.
   *
   * @param array $items
   *   The items provided by getItems for a single row.
   *
   * @return string
   *   The rendered items.
   */
  public function renderItems($items);

}

Members

Namesort descending Modifiers Type Description Overrides
DerivativeInspectionInterface::getBaseId public function Gets the base_plugin_id of the plugin instance. 1
DerivativeInspectionInterface::getDerivativeId public function Gets the derivative_id of the plugin instance. 1
FieldHandlerInterface::advancedRender public function Renders a field using advanced settings. 1
FieldHandlerInterface::clickSort public function Adds an ORDER BY clause to the query for click sort columns. 1
FieldHandlerInterface::clickSortable public function Determines if this field is click sortable. 1
FieldHandlerInterface::elementClasses public function Returns the class of the field. 1
FieldHandlerInterface::elementLabelClasses public function Returns the class of the field's label. 1
FieldHandlerInterface::elementLabelType public function Returns an HTML element for the label based upon the field's element type. 1
FieldHandlerInterface::elementType public function Returns an HTML element based upon the field's element type. 1
FieldHandlerInterface::elementWrapperClasses public function Returns the class of the field's wrapper. 1
FieldHandlerInterface::elementWrapperType public function Returns an HTML element for the wrapper based upon the field's element type. 1
FieldHandlerInterface::getElements public function Provides a list of elements valid for field HTML. 1
FieldHandlerInterface::getEntity public function Gets the entity matching the current row and relationship. 1
FieldHandlerInterface::getRenderTokens public function Gets the 'render' tokens to use for advanced rendering. 1
FieldHandlerInterface::getValue public function Gets the value that's supposed to be rendered. 1
FieldHandlerInterface::isValueEmpty public function Checks if a field value is empty. 1
FieldHandlerInterface::label public function Gets this field's label. 1
FieldHandlerInterface::postRender public function Runs after every field has been rendered. 1
FieldHandlerInterface::preRender public function Runs before any fields are rendered. 1
FieldHandlerInterface::render public function Renders the field. 1
FieldHandlerInterface::renderText public function Performs an advanced text render for the item. 1
FieldHandlerInterface::theme public function Passes values to drupal_render() using $this->themeFunctions() as #theme. 1
FieldHandlerInterface::tokenizeValue public function Replaces a value with tokens from the last field. 1
FieldHandlerInterface::useStringGroupBy public function Determines if this field will be available as an option to group the result by in the style settings. 1
MultiItemsFieldHandlerInterface::getItems public function Gets an array of items for the field. 2
MultiItemsFieldHandlerInterface::renderItems public function Render all items in this field together. 2
MultiItemsFieldHandlerInterface::render_item public function Renders a single item of a row. 4
PluginInspectionInterface::getPluginDefinition public function Gets the definition of the plugin implementation. 4
PluginInspectionInterface::getPluginId public function Gets the plugin_id of the plugin instance. 2
ViewsHandlerInterface::access public function Check whether given user has access to this handler. 1
ViewsHandlerInterface::adminLabel public function Return a string representing this handler's name in the UI. 1
ViewsHandlerInterface::adminSummary public function Provide text for the administrative summary. 1
ViewsHandlerInterface::breakString public static function Breaks x,y,z and x+y+z into an array. 1
ViewsHandlerInterface::broken public function Determines if the handler is considered 'broken', meaning it's a placeholder used when a handler can't be found. 1
ViewsHandlerInterface::ensureMyTable public function Ensure the main table for this handler is in the query. This is used a lot. 1
ViewsHandlerInterface::getEntityType public function Determines the entity type used by this handler. 1
ViewsHandlerInterface::getField public function Shortcut to get a handler's raw field value. 1
ViewsHandlerInterface::getJoin public function Get the join object that should be used for this handler. 1
ViewsHandlerInterface::getTableJoin public static function Fetches a handler to join one table to a primary table from the data cache. 1
ViewsHandlerInterface::postExecute public function Run after the view is executed, before the result is cached. 1
ViewsHandlerInterface::preQuery public function Run before the view is built. 1
ViewsHandlerInterface::sanitizeValue public function Sanitize the value for output. 1
ViewsHandlerInterface::setRelationship public function Called just prior to query(), this lets a handler set up any relationship it needs. 1
ViewsHandlerInterface::showExposeForm public function Shortcut to display the exposed options form. 1
ViewsPluginInterface::buildOptionsForm public function Provide a form to edit options for this plugin. 1
ViewsPluginInterface::create public static function
ViewsPluginInterface::destroy public function Clears a plugin. 1
ViewsPluginInterface::filterByDefinedOptions public function Filter out stored options depending on the defined options. 1
ViewsPluginInterface::getAvailableGlobalTokens public function Returns an array of available token replacements. 1
ViewsPluginInterface::getProvider public function Returns the plugin provider. 1
ViewsPluginInterface::globalTokenForm public function Adds elements for available core tokens to a form. 1
ViewsPluginInterface::globalTokenReplace public function Returns a string with any core tokens replaced. 1
ViewsPluginInterface::init public function Initialize the plugin. 1
ViewsPluginInterface::pluginTitle public function Return the human readable name of the display. 1
ViewsPluginInterface::preRenderAddFieldsetMarkup public static function Moves form elements into fieldsets for presentation purposes. 1
ViewsPluginInterface::preRenderFlattenData public static function Flattens the structure of form elements. 1
ViewsPluginInterface::query public function Add anything to the query that we might need to. 1
ViewsPluginInterface::submitOptionsForm public function Handle any special handling on the validate form. 1
ViewsPluginInterface::summaryTitle public function Returns the summary of the settings in the display. 1
ViewsPluginInterface::themeFunctions public function Provide a full list of possible theme templates used by this style. 1
ViewsPluginInterface::unpackOptions public function Unpack options over our existing defaults, drilling down into arrays so that defaults don't get totally blown away. 1
ViewsPluginInterface::usesOptions public function Returns the usesOptions property. 1
ViewsPluginInterface::validate public function Validate that the plugin is correct and can be saved. 1
ViewsPluginInterface::validateOptionsForm public function Validate the options form. 1