public function addLayout($layout, $args = [])
    {
        if ($layout instanceof FieldsBuilder) {
            $layout = clone $layout;
        } else {
            $layout = new FieldsBuilder($layout, $args);
        }

        $layout = $this->initializeLayout($layout, $args);
        $this->pushLayout($layout);

        return $layout;
    }
public function addLayout($layout, $args = [])
    {
        if ($layout instanceof FieldsBuilder) {
            $layout = clone $layout;
        } else {
            $layout = new FieldsBuilder($layout, $args);
        }

        $layout = $this->initializeLayout($layout, $args);
        $this->pushLayout($layout);

        return $layout;
    }
public function addLayout ( $ layout , $ args = [ ] ) { if ( $ layout instanceof FieldsBuilder ) { $ layout = clone $ layout ; } else { $ layout = new FieldsBuilder ( $ layout , $ args ) ; } $ layout = $ this -> initializeLayout ( $ layout , $ args ) ; $ this -> pushLayout ( $ layout ) ; return $ layout ; }
Add a layout, which is a FieldsBuilder. `addLayout` can be chained to add
multiple layouts to the Flexible Content field.
@param string|FieldsBuilder $layout layout name.
Alternatively supply a FieldsBuilder to reuse existing fields. The name
will be inferred from the FieldsBuilder's name.
@param array $args filed configuration
@return FieldsBuilder
Add a layout which is a FieldsBuilder . addLayout can be chained to add multiple layouts to the Flexible Content field .