|
|
@@ -35,6 +35,12 @@ use Cake\Validation\Validator;
|
|
|
*/
|
|
|
class Form
|
|
|
{
|
|
|
+ /**
|
|
|
+ * Schema class.
|
|
|
+ *
|
|
|
+ * @var string
|
|
|
+ */
|
|
|
+ protected $_schemaClass = '\Cake\Form\Schema';
|
|
|
|
|
|
/**
|
|
|
* The schema used by this form.
|
|
|
@@ -70,7 +76,7 @@ class Form
|
|
|
public function schema(Schema $schema = null)
|
|
|
{
|
|
|
if ($schema === null && empty($this->_schema)) {
|
|
|
- $schema = $this->_buildSchema(new Schema());
|
|
|
+ $schema = $this->_buildSchema(new $this->_schemaClass);
|
|
|
}
|
|
|
if ($schema) {
|
|
|
$this->_schema = $schema;
|