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