Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Crawler.php

function Crawler::images

Returns an array of Image objects for the nodes in the list.

Return value

Image[]

File

vendor/symfony/dom-crawler/Crawler.php, line 825

Class

Crawler
Crawler eases navigation of a list of \DOMNode objects.

Namespace

Symfony\Component\DomCrawler

Code

public function images() : array {
    $images = [];
    foreach ($this as $node) {
        if (!$node instanceof \DOMElement) {
            throw new \InvalidArgumentException(\sprintf('The current node list should contain only DOMElement instances, "%s" found.', get_debug_type($node)));
        }
        $images[] = new Image($node, $this->baseHref);
    }
    return $images;
}
RSS feed
Powered by Drupal