public function getSubFields(): array
    {
        $fields = [];

        foreach ($this->config->get('sub_fields') as $field) {
            $field->setParentKey($this->getKey());

            $fields[] = $field->toArray();
        }

        return $fields;
    }
public function getSubFields(): array
    {
        $fields = [];

        foreach ($this->config->get('sub_fields') as $field) {
            $field->setParentKey($this->getKey());

            $fields[] = $field->toArray();
        }

        return $fields;
    }
public function getSubFields ( ) : array { $ fields = [ ] ; foreach ( $ this -> config -> get ( 'sub_fields' ) as $ field ) { $ field -> setParentKey ( $ this -> getKey ( ) ) ; $ fields [ ] = $ field -> toArray ( ) ; } return $ fields ; }
Get the sub fields.

@return array
Get the sub fields .