Esempio n. 1
0
 public function _buildSchema(Schema $schema)
 {
     $schema->addField('nome', 'string');
     $schema->addField('email', 'string');
     $schema->addField('mensagem', 'text');
     return $schema;
 }
Esempio n. 2
0
 public static function getForm(string $tabId = null) : Form
 {
     $schema = new Schema();
     $settings = self::getSettings($tabId);
     /** @var $v \ThreeCMS\Core\Settings\Setting **/
     foreach ($settings as $v) {
         $schema->addField($v->getKey(), ['type' => 'text']);
     }
     $form = new Form();
     $form->validator(self::getValidator($tabId));
     $form->schema($schema);
     return $form;
 }
Esempio n. 3
0
 /**
  * Build form schema
  *
  * @param \Cake\Form\Schema $schema Schema
  * @return \Cake\Form\Schema
  */
 protected function _buildSchema(Schema $schema)
 {
     return $schema->addField('current_password', ['type' => 'password'])->addField('new_password', ['type' => 'password'])->addField('confirm_new_password', ['type' => 'password']);
 }
 protected function _buildSchema(Schema $schema)
 {
     return $schema->addField('osm_section', 'int');
 }
Esempio n. 5
0
 protected function _buildSchema(Schema $schema)
 {
     return $schema->addField('scoutgroup', 'integer')->addField('email', 'varchar');
 }
Esempio n. 6
0
 protected function _buildSchema(Schema $schema)
 {
     return $schema->addField('cubs', 'integer')->addField('yls', 'integer')->addField('leaders', 'integer');
 }
Esempio n. 7
0
 protected function _buildSchema(Schema $schema)
 {
     return $schema->addField('email', ['type' => 'string']);
 }
Esempio n. 8
0
 protected function _buildSchema(Schema $schema)
 {
     return $schema->addField('searchWhat', ['type' => 'string'])->addField('searchField', ['type' => 'string']);
 }
Esempio n. 9
0
 protected function _buildSchema(Schema $schema)
 {
     return $schema->addField('assunto', 'string')->addField('corpo', ['type' => 'text']);
 }
 protected function _buildSchema(Schema $schema)
 {
     return $schema->addField('newpw', ['type' => 'string'])->addField('confirm', ['type' => 'string'])->addField('postcode', ['type' => 'string']);
 }
Esempio n. 11
0
 /**
  * test __debugInfo
  *
  * @return void
  */
 public function testDebugInfo()
 {
     $schema = new Schema();
     $schema->addField('name', 'string')->addField('numbery', ['type' => 'decimal', 'required' => true]);
     $result = $schema->__debugInfo();
     $expected = ['_fields' => ['name' => ['type' => 'string', 'length' => null, 'precision' => null], 'numbery' => ['type' => 'decimal', 'length' => null, 'precision' => null]]];
     $this->assertEquals($expected, $result);
 }
 protected function _buildSchema(Schema $schema)
 {
     return $schema->addField('firstname', 'string')->addField('lastname', 'string')->addField('email', ['type' => 'email'])->addField('website', ['type' => 'string'])->addField('phone', ['type' => 'tel']);
 }
Esempio n. 13
0
 protected function _buildSchema(Schema $schema)
 {
     return $schema->addField('osm_email', 'string')->addField('osm_password', 'string');
 }
 protected function _buildSchema(Schema $schema)
 {
     return $schema->addField('name', 'string')->addField('description', ['type' => 'string']);
 }
Esempio n. 15
0
 /**
  * test fieldType
  *
  * @return void
  */
 public function testFieldType()
 {
     $schema = new Schema();
     $schema->addField('name', 'string')->addField('numbery', ['type' => 'decimal', 'required' => true]);
     $this->assertEquals('string', $schema->fieldType('name'));
     $this->assertEquals('decimal', $schema->fieldType('numbery'));
     $this->assertNull($schema->fieldType('nope'));
 }
Esempio n. 16
0
 protected function _buildSchema(Schema $schema)
 {
     return $schema->addField('id', 'integer')->addField('qte', ['type' => 'integer']);
 }
 protected function _buildSchema(Schema $schema)
 {
     return $schema->addField('agree1', 'boolean')->addField('agree2', 'boolean');
 }
Esempio n. 18
0
 protected function _buildSchema(Schema $schema)
 {
     return $schema->addField('link', 'string');
 }
Esempio n. 19
0
 protected function _buildSchema(Schema $schema)
 {
     return $schema->addField('name', ['type' => 'string', 'length' => 40])->addField('email', ['type' => 'string', 'length' => 50])->addField('subject', ['type' => 'string', 'length' => 60])->addField('body', ['type' => 'text']);
 }
Esempio n. 20
0
 protected function _buildSchema(Schema $schema)
 {
     return $schema->addField('id', 'int');
     return $schema->addField('controller', 'int');
 }
Esempio n. 21
0
 protected function _buildSchema(Schema $schema)
 {
     return $schema->addField('firstname', 'string')->addField('lastname', 'string')->addField('position', 'string')->addField('company', 'string')->addField('email', ['type' => 'email'])->addField('phone', ['type' => 'tel'])->addField('info', ['type' => 'select'])->addField('message', ['type' => 'text']);
 }
Esempio n. 22
0
 /**
  * Defines virtual schema for model-less form fields.
  *
  * @param Cake\Form\Schema $schema Instance of Schema
  * @return Cake\Form\Schema
  */
 protected function _buildSchema(Schema $schema)
 {
     return $schema->addField('url', 'string')->addField('webroot', ['type' => 'string'])->addField('force', ['type' => 'boolean']);
 }
Esempio n. 23
0
 /**
  * The schema definition for the fields of this form.
  *
  * @param Schema $schema The schema to customize.
  * @return $this
  */
 protected function _buildSchema(Schema $schema)
 {
     return $schema->addField('name', 'string')->addField('email', 'string')->addField('subject', 'string')->addField('message', 'text');
 }
Esempio n. 24
0
 protected function _buildSchema(Schema $schema)
 {
     return $schema->addField('name', 'string')->addField('email', ['type' => 'string'])->addField('body', ['type' => 'text']);
 }
Esempio n. 25
0
 protected function _buildSchema(Schema $schema)
 {
     return $schema->addField('nom', 'string')->addField('prenom', 'string')->addField('email', 'string')->addField('telephone', 'string')->addField('adresse', 'string')->addField('codePostal', 'string')->addField('ville', 'string')->addField('adresseChantier', 'string')->addField('commentaire', 'text');
 }