This commit is contained in:
2020-07-13 17:09:59 +02:00
parent 03559a7b76
commit 3a082e23cc
492 changed files with 4129 additions and 982 deletions
@@ -355,6 +355,7 @@ class BulkForm extends FieldPluginBase implements CacheableDependencyInterface {
*
* @param bool $filtered
* (optional) Whether to filter actions to selected actions.
*
* @return array
* An associative array of operations, suitable for a select element.
*/
@@ -537,6 +537,7 @@ abstract class StylePluginBase extends PluginBase {
* Views 7.x-3.0-rc2. After Views 7.x-3.0 this boolean is only used if
* $groupings is an old-style string or if the rendered option is missing
* for a grouping instruction.
*
* @return
* The grouped record set.
* A nested set structure is generated if multiple grouping fields are used.
+3 -2
View File
@@ -115,14 +115,15 @@ class Views {
* @param string $id
* The view ID to load.
*
* @return \Drupal\views\ViewExecutable
* A view executable instance, from the loaded entity.
* @return \Drupal\views\ViewExecutable|null
* A view executable instance or NULL if the view does not exist.
*/
public static function getView($id) {
$view = \Drupal::entityTypeManager()->getStorage('view')->load($id);
if ($view) {
return static::executableFactory()->get($view);
}
return NULL;
}
/**
@@ -8,6 +8,7 @@ use Drupal\Core\Config\TypedConfigManagerInterface;
use Drupal\Core\DependencyInjection\ContainerInjectionInterface;
use Drupal\Core\Entity\EntityFieldManagerInterface;
use Drupal\Core\Entity\EntityTypeManagerInterface;
use Drupal\Core\Entity\FieldableEntityInterface;
use Drupal\Core\Entity\Sql\DefaultTableMapping;
use Symfony\Component\DependencyInjection\ContainerInterface;
@@ -285,7 +286,7 @@ class ViewsConfigUpdater implements ContainerInjectionInterface {
$table_info = [];
foreach ($this->entityTypeManager->getDefinitions() as $entity_type_id => $entity_type) {
if ($entity_type->hasHandlerClass('views_data')) {
if ($entity_type->hasHandlerClass('views_data') && $entity_type->entityClassImplements(FieldableEntityInterface::class)) {
$base_field_definitions = $this->entityFieldManager->getBaseFieldDefinitions($entity_type_id);
$entity_storage = $this->entityTypeManager->getStorage($entity_type_id);