Former\Form\Group::getLabel PHP Method

getLabel() protected method

Prints out the current label
protected getLabel ( string $field = null ) : string
$field string The field to create a label for
return string A
    protected function getLabel($field = null)
    {
        // Don't create a label if none exist
        if (!$field or !$this->label) {
            return null;
        }
        // Wrap label in framework classes
        $this->label->addClass($this->app['former.framework']->getLabelClasses());
        $this->label = $this->app['former.framework']->createLabelOf($field, $this->label);
        $this->label = $this->app['former.framework']->wrapLabel($this->label);
        return $this->label;
    }