Gregwar\Formidable\Fields\Field::getName PHP Method

getName() public method

public getName ( )
    public function getName()
    {
        $name = $this->getBaseName();
        if ($this->index !== null) {
            if ($this->index) {
                foreach ($this->index as $part) {
                    $name .= '[' . $part . ']';
                }
            } else {
                $name .= '[]';
            }
        }
        if ($this->hook !== null) {
            $hook = $this->hook;
            return $hook($name);
        } else {
            return $name;
        }
    }