executeHook($target, $this->pluginDefinition['hook']); } catch (\LogicException $e) { $this->logger->warning($e->getMessage(), [ 'target' => $target->id(), 'hook' => $this->pluginDefinition['hook'], ]); return; } foreach ($widgets as $id => $widget) { $render = [ '#module' => $target->id(), '#class' => $this->toTitleCase($id), '#theme' => 'dmu_widget', '#info' => [ 'id' => $id, 'label' => $widget['label'], 'description' => $widget['description'] ?: NULL, 'field_types' => $widget['field types'], ], ]; $this->writeClass($target, $this->parse($render)); } } }