Field::setName() method

Set the field’s name

This method will throw a WireException when field name is a reserved word, is already in use, is a system field, or is in some format not accepted for a field name.

Usage

$field = $field->setName(string $name);

Arguments

NameType(s)Description
$namestring

Return value

Field

$this

Exceptions

Method can throw exceptions on error:

  • WireException


$field methods and properties

API reference based on ProcessWire core version 3.0.251