attachedAssets = new AttachedAssets(); if (is_array($this->content)) { if (!$this->content) { return ''; } $html = \Drupal::service('renderer')->renderRoot($this->content); $this->attachedAssets = AttachedAssets::createFromRenderArray($this->content); return $html; } else { return $this->content; } } /** * Gets the attached assets. * * @return \Drupal\Core\Asset\AttachedAssets|null * The attached assets for this command. */ public function getAttachedAssets() { return $this->attachedAssets; } }