public function id($name)
    {
        $keepIdx = preg_replace('/\[(\d+)\]/', "_$1", $name);
        $unbracketted = $this->removeBrackets($keepIdx, '_');
        $nothingWeird = preg_replace('/[^\w\d\_]+?/', "", $unbracketted);
        $noTrail = preg_replace('/_$/', "", $nothingWeird);

        $clean = $noTrail;

        if (!is_null($this->associatedEntity) && $this->associatedEntity->isSupportedAttribute($name)) {
            $clean = $this->associatedEntity->getInputName() . "_" . $clean;
        }

        return $this->keys['POST_WRAP'] . "_" . $clean;
    }
public function id($name)
    {
        $keepIdx = preg_replace('/\[(\d+)\]/', "_$1", $name);
        $unbracketted = $this->removeBrackets($keepIdx, '_');
        $nothingWeird = preg_replace('/[^\w\d\_]+?/', "", $unbracketted);
        $noTrail = preg_replace('/_$/', "", $nothingWeird);

        $clean = $noTrail;

        if (!is_null($this->associatedEntity) && $this->associatedEntity->isSupportedAttribute($name)) {
            $clean = $this->associatedEntity->getInputName() . "_" . $clean;
        }

        return $this->keys['POST_WRAP'] . "_" . $clean;
    }
public function id ( $ name ) { $ keepIdx = preg_replace ( '/\[(\d+)\]/' , "_$1" , $ name ) ; $ unbracketted = $ this -> removeBrackets ( $ keepIdx , '_' ) ; $ nothingWeird = preg_replace ( '/[^\w\d\_]+?/' , "" , $ unbracketted ) ; $ noTrail = preg_replace ( '/_$/' , "" , $ nothingWeird ) ; $ clean = $ noTrail ; if ( ! is_null ( $ this -> associatedEntity ) && $ this -> associatedEntity -> isSupportedAttribute ( $ name ) ) { $ clean = $ this -> associatedEntity -> getInputName ( ) . "_" . $ clean ; } return $ this -> keys [ 'POST_WRAP' ] . "_" . $ clean ; }
Generates an id from a field name
@param  string $name
@return string
Generates an id from a field name