src/Cms/Definition/ContentGroupDefiner.php
public function withArrayOf(string $name, string $label, callable $elementContentDefinitionCallback)
    {
        $definition = new ContentGroupDefinition('__element__', $name);
        $elementContentDefinitionCallback(new self($definition));

        $this->contentGroup->nestedArrayContentGroups[$name] = [
            'name'       => $name,
            'label'      => $label,
            'order'      => $this->order++,
            'definition' => $definition,
        ];

        return $this;
    }
public function withArrayOf(string $name, string $label, callable $elementContentDefinitionCallback)
    {
        $definition = new ContentGroupDefinition('__element__', $name);
        $elementContentDefinitionCallback(new self($definition));

        $this->contentGroup->nestedArrayContentGroups[$name] = [
            'name'       => $name,
            'label'      => $label,
            'order'      => $this->order++,
            'definition' => $definition,
        ];

        return $this;
    }
public function withArrayOf ( string $ name , string $ label , callable $ elementContentDefinitionCallback ) { $ definition = new ContentGroupDefinition ( '__element__' , $ name ) ; $ elementContentDefinitionCallback ( new self ( $ definition ) ) ; $ this -> contentGroup -> nestedArrayContentGroups [ $ name ] = [ 'name' => $ name , 'label' => $ label , 'order' => $ this -> order ++ , 'definition' => $ definition , ] ; return $ this ; }
Defines an array field.

Example:
<code>
->withArrayOf('some-slider', 'Multiple Images', function (ContentGroupDefiner $group) {
$group->withImage(...);
})
</code>

@param string   $name
@param string   $label
@param callable $elementContentDefinitionCallback

@return static
Defines an array field .