0 follower

Trait Yiisoft\Html\Tag\Base\TagSourcesTrait

Implemented byYiisoft\Html\Tag\Audio, Yiisoft\Html\Tag\Base\MediaTag, Yiisoft\Html\Tag\Picture, Yiisoft\Html\Tag\Video

Adds functionality for processing tag with children {@see Source} tags.

Method Details

Hide inherited methods

addSource() public method

public Yiisoft\Html\Tag\Base\TagSourcesTrait addSource ( Yiisoft\Html\Tag\Source $source )
$source Yiisoft\Html\Tag\Source

                public function addSource(Source $source): static
{
    $new = clone $this;
    $new->sources[] = $source;
    return $new;
}

            
sources() public method

public Yiisoft\Html\Tag\Base\TagSourcesTrait sources ( Yiisoft\Html\Tag\Source $sources )
$sources Yiisoft\Html\Tag\Source

                public function sources(Source ...$sources): static
{
    $new = clone $this;
    $new->sources = $sources;
    return $new;
}