public function setName($name)
    {
        $attrName = $this->isMultiple()
            ? "{$name}[]"
            : $name;
        $this->setAttribute('name', $attrName);
        $this->name = $name;
        if ($label = $this->getLabel()) {
            $this->getLabel()->setAttribute('for', $this->generateId());
        }
        return $this;
    }
public function setName($name)
    {
        $attrName = $this->isMultiple()
            ? "{$name}[]"
            : $name;
        $this->setAttribute('name', $attrName);
        $this->name = $name;
        if ($label = $this->getLabel()) {
            $this->getLabel()->setAttribute('for', $this->generateId());
        }
        return $this;
    }
public function setName ( $ name ) { $ attrName = $ this -> isMultiple ( ) ? "{$name}[]" : $ name ; $ this -> setAttribute ( 'name' , $ attrName ) ; $ this -> name = $ name ; if ( $ label = $ this -> getLabel ( ) ) { $ this -> getLabel ( ) -> setAttribute ( 'for' , $ this -> generateId ( ) ) ; } return $ this ; }
Sets input name

@param string $name

@return self|$this|InputInterface|AbstractInput
Sets input name