Класс Schema
Содержит информацию схемы для экземпляров Form.
Краткое описание свойств
- $_fieldDefaults protected
array<string, mixed>Значения по умолчанию для полей.
- $_fields protected
array<string, array<string, mixed>>Поля в этой схеме.
Краткое описание методов
-
__debugInfo() public
Получить печатную версию этого объекта
-
addField() public
Добавляет поле в схему.
-
addFields() public
Добавляет несколько полей в схему.
-
field() public
Получить атрибуты для заданного поля.
-
fieldType() public
Получить тип поля с заданным именем.
-
fields() public
Получить список полей в схеме.
-
removeField() public
Удаляет поле из схемы.
Подробное описание методов
__debugInfo() public
__debugInfo(): array<string, mixed>
Получить печатную версию этого объекта
Возвращает
array<string, mixed>addField() public
addField(string $name, array<string, mixed>|string $attrs): $this
Добавляет поле в схему.
Параметры
-
string$name Имя поля.
-
array<string, mixed>|string$attrs Атрибуты поля или тип в виде строки.
Возвращает
$thisaddFields() public
addFields(array<string, array<string, mixed>|string> $fields): $this
Добавляет несколько полей в схему.
Параметры
-
array<string, array<string, mixed>|string>$fields Поля для добавления.
Возвращает
$thisfield() public
field(string $name): array<string, mixed>|null
Получить атрибуты для заданного поля.
Параметры
-
string$name Имя поля.
Возвращает
array<string, mixed>|nullfieldType() public
fieldType(string $name): string|null
Получить тип поля с заданным именем.
Параметры
-
string$name Имя поля.
Возвращает
string|nullfields() public
fields(): array<string>
Получить список полей в схеме.
Возвращает
array<string>removeField() public
removeField(string $name): $this
Удаляет поле из схемы.
Параметры
-
string$name Поле для удаления.
Возвращает
$thisПодробное описание свойств
$_fieldDefaults protected
Значения по умолчанию для полей.
Тип
array<string, mixed>$_fields protected
Поля в этой схеме.
Тип
array<string, array<string, mixed>>
© 2005–present The Cake Software Foundation, Inc.
Licensed under the MIT License.
CakePHP is a registered trademark of Cake Software Foundation, Inc.
We are not endorsed by or affiliated with CakePHP.
https://api.cakephp.org/4.4/class-Cake.Form.Schema.html