CommandWithAttachedAssetsTrait::getRenderedContent

protected CommandWithAttachedAssetsTrait::getRenderedContent() Processes the content for output. If content is a render array, it may contain attached assets to be processed. Return value string|\Drupal\Component\Render\MarkupInterface HTML rendered content. File core/lib/Drupal/Core/Ajax/CommandWithAttachedAssetsTrait.php, line 30 Class CommandWithAttachedAssetsTrait Trait for Ajax commands that render content and attach assets. Namespace Drupal\Core\Ajax Code protected function getR

CommandWithAttachedAssetsInterface

Interface for Ajax commands that render content and attach assets. All Ajax commands that render HTML should implement these methods to be able to return attached assets to the calling AjaxResponse object. Hierarchy interface \Drupal\Core\Ajax\CommandWithAttachedAssetsInterface Related topics Ajax API Overview for Drupal's Ajax API. File core/lib/Drupal/Core/Ajax/CommandWithAttachedAssetsInterface.php, line 13 Namespace Drupal\Core\Ajax Members Name Modifiers Type Description

CommandWithAttachedAssetsTrait::$attachedAssets

The attached assets for this Ajax command. Type: \Drupal\Core\Asset\AttachedAssets File core/lib/Drupal/Core/Ajax/CommandWithAttachedAssetsTrait.php, line 19 Class CommandWithAttachedAssetsTrait Trait for Ajax commands that render content and attach assets. Namespace Drupal\Core\Ajax Code protected $attachedAssets;

CommandLineOrUnsafeMethod::isCli

protected CommandLineOrUnsafeMethod::isCli() Indicates whether this is a CLI request. File core/lib/Drupal/Core/PageCache/RequestPolicy/CommandLineOrUnsafeMethod.php, line 29 Class CommandLineOrUnsafeMethod Reject when running from the command line or when HTTP method is not safe. Namespace Drupal\Core\PageCache\RequestPolicy Code protected function isCli() { return PHP_SAPI === 'cli'; }

CommandWithAttachedAssetsTrait

Trait for Ajax commands that render content and attach assets. Hierarchy trait \Drupal\Core\Ajax\CommandWithAttachedAssetsTrait Related topics Ajax API Overview for Drupal's Ajax API. File core/lib/Drupal/Core/Ajax/CommandWithAttachedAssetsTrait.php, line 12 Namespace Drupal\Core\Ajax Members Name Modifiers Type Description CommandWithAttachedAssetsTrait::$attachedAssets protected property The attached assets for this Ajax command. CommandWithAttachedAssetsTrait::get

CommandWithAttachedAssetsInterface::getAttachedAssets

public CommandWithAttachedAssetsInterface::getAttachedAssets() Gets the attached assets. Return value \Drupal\Core\Asset\AttachedAssets|null The attached assets for this command. File core/lib/Drupal/Core/Ajax/CommandWithAttachedAssetsInterface.php, line 21 Class CommandWithAttachedAssetsInterface Interface for Ajax commands that render content and attach assets. Namespace Drupal\Core\Ajax Code public function getAttachedAssets();

CommandWithAttachedAssetsTrait::getAttachedAssets

public CommandWithAttachedAssetsTrait::getAttachedAssets() Gets the attached assets. Return value \Drupal\Core\Asset\AttachedAssets|null The attached assets for this command. Overrides CommandWithAttachedAssetsInterface::getAttachedAssets File core/lib/Drupal/Core/Ajax/CommandWithAttachedAssetsTrait.php, line 48 Class CommandWithAttachedAssetsTrait Trait for Ajax commands that render content and attach assets. Namespace Drupal\Core\Ajax Code public function getAttachedAssets() { ret

Com::generate

public Com::generate() Generates a Universally Unique IDentifier (UUID). Return value A 16 byte integer represented as a hex string formatted with 4 hyphens. Overrides UuidInterface::generate File core/lib/Drupal/Component/Uuid/Com.php, line 14 Class Com Generates a UUID using the Windows internal GUID extension. Namespace Drupal\Component\Uuid Code public function generate() { // Remove {} wrapper and make lower case to keep result consistent. return strtolower(trim(com_create_gu

CommandLineOrUnsafeMethod

Reject when running from the command line or when HTTP method is not safe. The policy denies caching if the request was initiated from the command line interface (drush) or the request method is neither GET nor HEAD (see RFC 2616, section 9.1.1 - Safe Methods). Hierarchy class \Drupal\Core\PageCache\RequestPolicy\CommandLineOrUnsafeMethod implements RequestPolicyInterface File core/lib/Drupal/Core/PageCache/RequestPolicy/CommandLineOrUnsafeMethod.php, line 15 Namespace Drupal\Core\PageCa

CommandInterface::render

public CommandInterface::render() Return an array to be run through json_encode and sent to the client. File core/lib/Drupal/Core/Ajax/CommandInterface.php, line 18 Class CommandInterface AJAX command interface. Namespace Drupal\Core\Ajax Code public function render();