Skip to content

Add ability to set Generator as a content item.  #99

@yiiliveext

Description

@yiiliveext
$items = ['blue', 'green', 'red'];

echo Div::tag()->content(
    'Collors', 
    '<br>', 
    (static function() use ($items): Generator
    {
        foreach ($items as $item) {
            yield Div::tag()->content($item);
        }
    })()
    );

See an example https://3v4l.org/brubX

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions