Method to get the legend of the current fieldset

@return string
770178
public function getLegend()
    {
        return (isset($this->fieldsets[$this->current])) ?
            $this->fieldsets[$this->current]->getLegend() : null;
    }
377281
public function getHtmlHeadEntrySet()
    {
        $set = parent::getHtmlHeadEntrySet();

        foreach ($this->action_items as $child_widget) {
            $set->addEntrySet($child_widget->getHtmlHeadEntrySet());
        }

        return $set;
    }
482631
public function toArray()
    {
        $fieldValues = [];
        foreach ($this->fieldsets as $fieldset) {
            $fieldValues = array_merge($fieldValues, $fieldset->toArray());
        }
        return $fieldValues;
    }
991655
public function generateFieldset($data)
	{
		/** @var Fieldset $fieldset */
		$fieldset = new $this->fieldsetClass;

		if (array_key_exists('attributes', $data))
		{
			$fieldset->setAttributes($data['attributes']);
		}

		if (array_key_exists('legend', $data))
		{
			$fieldset->setLegend($data['legend']);
		}

		if (array_key_exists('content', $data))
		{
			$content = $this->generate($data['content']);
			$fieldset->setContents($content);
		}

		return $fieldset;
	}
129750
public function getCMSFields()
    {
        $this->beforeUpdateCMSFields(function (FieldList $fields) {
            $fields
                ->fieldByName('Root.Main.HTML')
                ->setTitle(_t(__CLASS__ . '.ContentLabel', 'Content'));
        });
        return parent::getCMSFields();
    }
57662
public function toString()
    {
        $string = '';
        $headers = $this->headers;
        if ($this->canSort()) {
            uksort($headers, [$this, 'sortHeaders']);
        }
        foreach ($headers as $collection) {
            foreach ($collection as $header) {
                if ($this->isDisplayed($header) || '' != $header->getFieldBody()) {
                    $string .= $header->toString();
                }
            }
        }

        return $string;
    }
847272
public function getSet()
    {
        $format = function ($value, $field) {
            return $this->connection->quoteIdentifier($field) . '=' . $this->connection->quote($value);
        };

        return implode(',', array_map($format, $this->data, array_keys($this->data)));
    }
1166498
public function getCurrentDocumentSet()
    {
        if ($id = $this->getRequest()->getVar('dsid')) {
            return DMSDocumentSet::get()->byId($id);
        }
        return singleton('DMSDocumentSet');
    }
604337
public function getFields()
    {
        $fields = FieldList::create($this->fields);
        
        foreach ($fields as $field) {
            
            $fields->insertAfter(
                $field->getName(),
                LiteralField::create(
                    sprintf('%s_ByLiteral', $field->getName()),
                    '<div class="by"><span class="icon"></span></div>'
                )
            );
            
        }
        
        return $fields;
    }
650166
public function getCMSFields()
    {
        // Obtain Field Objects (from parent):
        
        $fields = parent::getCMSFields();
        
        // Define Placeholder:
        
        $placeholder = _t(__CLASS__ . '.DROPDOWNDEFAULT', '(default)');
        
        // Create Style Fields:
        
        $fields->addFieldsToTab(
            'Root.Style',
            [
                FieldSection::create(
                    'IconStyle',
                    $this->fieldLabel('IconStyle'),
                    [
                        DropdownField::create(
                            'IconSize',
                            $this->fieldLabel('IconSize'),
                            SharingIcon::singleton()->getIconSizeOptions()
                        ),
                        DropdownField::create(
                            'Placement',
                            $this->fieldLabel('Placement'),
                            SharingIcon::singleton()->getPlacementOptions()
                        )->setEmptyString(' ')->setAttribute('data-placeholder', $placeholder)
                    ]
                )
            ]
        );
        
        // Create Options Fields:
        
        $fields->addFieldsToTab(
            'Root.Options',
            [
                FieldSection::create(
                    'IconOptions',
                    $this->fieldLabel('IconOptions'),
                    [
                        CheckboxField::create(
                            'ShowTitles',
                            $this->fieldLabel('ShowTitles')
                        )
                    ]
                )
            ]
        );
        
        // Answer Field Objects:
        
        return $fields;
    }
760353
protected function getTitleTag()
    {
        $legend_tag = new SwatHtmlTag('legend');
        $legend_tag->setContent($this->title, $this->title_content_type);

        return $legend_tag;
    }
1230281
public function getPattern() : ?string 
    {
        if ( ! $this->hasPattern()) {
            $this->setPattern($this->getDefaultPattern());
        }
        return $this->pattern;
    }
1301408
protected function Init()
    {
        $fieldset = ContentFieldset::Schema()->ByContent($this->Content());
        $this->id = $this->CssID();
        $this->classes = $this->CssClass();
        $this->legend = $fieldset->GetLegend();
        return parent::Init();
    }
204547
public function getFieldsAttribute()
    {
        $fields = new Collection();

        foreach ($this->attributes['fields'] as $field) {
            if (! ($field instanceof Field)) {
                $field = $this->discord->factory(Field::class, $field, true);
            }

            $fields->push($field);
        }

        return $fields;
    }
718045
public function getRenderInline()
    {
        // Check File Exists / File Extension:
        
        if ($this->owner->exists() && $this->owner->getExtension() == 'svg') {
            
            // Create DOM Document:
            
            $dom = new DOMDocument();
            
            // Load SVG Data into DOM:
            
            $dom->load(BASE_PATH . $this->owner->URL);
            
            // Normalise SVG Data:
            
            $dom->normalizeDocument();
            
            // Render SVG as HTML:
            
            return DBField::create_field('HTMLFragment', $dom->saveHTML($dom->documentElement));
            
        }
    }
461955
public function getFieldsConfig()
    {
        if (null === $this->fieldsConfigList) {
            $this->fieldsConfigList = [];

            foreach ($this->getFields() as $field) {
                $reflectionProperty = $this->getReflector()->getProperty($field);
                $docBlock = $reflectionProperty->getDocComment();
                preg_match('/@var\s([a-z]*).*/', $docBlock, $matches);

                $this->fieldsConfigList[$field] = [
                    'type' => isset($matches[1]) ? $matches[1] : null
                ];
            }

        }

        return $this->fieldsConfigList;
    }
1030369
public function getCMSFields()
    {
        // Obtain Field Objects (from parent):
        
        $fields = parent::getCMSFields();
        
        // Create Style Fields:
        
        $fields->addFieldsToTab(
            'Root.Style',
            [
                FieldSection::create(
                    'NavigationStyle',
                    $this->fieldLabel('NavigationStyle'),
                    [
                        DropdownField::create(
                            'IconSize',
                            $this->fieldLabel('IconSize'),
                            Link::singleton()->getIconSizeOptions()
                        ),
                        NumericField::create(
                            'IconMargin',
                            $this->fieldLabel('IconMargin')
                        )
                    ]
                )
            ]
        );
        
        // Answer Field Objects:
        
        return $fields;
    }