public function ViewExecutable::getItem in Views (for Drupal 7) 8.3
Gets the configuration of a handler instance on a given display.
Parameters
string $display_id: The machine name of the display.
string $type: The type of handler to retrieve.
string $id: The ID of the handler to retrieve.
Return value
array|null Either the handler instance's configuration, or NULL if the handler is not used on the display.
1 call to ViewExecutable::getItem()
- ViewExecutable::setItemOption in lib/
Drupal/ views/ ViewExecutable.php - Sets an option on a handler instance.
File
- lib/
Drupal/ views/ ViewExecutable.php, line 2131 - Definition of Drupal\views\ViewExecutable.
Class
- ViewExecutable
- An object to contain all of the data to generate a view, plus the member functions to build the view query, execute the query and render the output.
Namespace
Drupal\viewsCode
public function getItem($display_id, $type, $id) {
// Get info about the types so we can get the right data.
$types = $this::viewsHandlerTypes();
// Initialize the display
$this
->setDisplay($display_id);
// Get the existing configuration
$fields = $this->displayHandlers[$display_id]
->getOption($types[$type]['plural']);
return isset($fields[$id]) ? $fields[$id] : NULL;
}