-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #59 from OS2Forms/f/OS-58_company_elements
F/os 58 company elements
- Loading branch information
Showing
13 changed files
with
578 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
67 changes: 67 additions & 0 deletions
67
modules/os2forms_nemid/src/Element/NemidCompanyApartmentNr.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
<?php | ||
|
||
namespace Drupal\os2forms_nemid\Element; | ||
|
||
use Drupal\Core\Form\FormStateInterface; | ||
|
||
/** | ||
* Provides a 'os2forms_nemid_company_apartment_nr'. | ||
* | ||
* @FormElement("os2forms_nemid_company_apartment_nr") | ||
* | ||
* @see \Drupal\Core\Render\Element\FormElement | ||
* @see https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Render%21Element%21FormElement.php/class/FormElement | ||
* @see \Drupal\Core\Render\Element\RenderElement | ||
* @see https://api.drupal.org/api/drupal/namespace/Drupal%21Core%21Render%21Element | ||
* @see \Drupal\os2forms_nemid\Element\NemidCompanyApartmentNr | ||
*/ | ||
class NemidCompanyApartmentNr extends NemidElementBase { | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function getInfo() { | ||
$class = get_class($this); | ||
return parent::getInfo() + [ | ||
'#process' => [ | ||
[$class, 'processNemidCompanyApartmentNr'], | ||
[$class, 'processAjaxForm'], | ||
], | ||
'#element_validate' => [ | ||
[$class, 'validateNemidCompanyApartmentNr'], | ||
], | ||
'#pre_render' => [ | ||
[$class, 'preRenderNemidCompanyApartmentNr'], | ||
], | ||
'#theme' => 'input__os2forms_nemid_company_apartment_nr', | ||
]; | ||
} | ||
|
||
/** | ||
* Processes a 'os2forms_nemid_company_apartment_nr' element. | ||
*/ | ||
public static function processNemidCompanyApartmentNr(&$element, FormStateInterface $form_state, &$complete_form) { | ||
// Here you can add and manipulate your element's properties and callbacks. | ||
return $element; | ||
} | ||
|
||
/** | ||
* Webform element validation for 'os2forms_nemid_company_apartment_nr'. | ||
*/ | ||
public static function validateNemidCompanyApartmentNr(&$element, FormStateInterface $form_state, &$complete_form) { | ||
// Here you can add custom validation logic. | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public static function preRenderNemidCompanyApartmentNr(array $element) { | ||
$element = parent::prerenderNemidElementBase($element); | ||
static::setAttributes($element, [ | ||
'form-text', | ||
'os2forms-nemid-company-apartment-nr', | ||
]); | ||
return $element; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
<?php | ||
|
||
namespace Drupal\os2forms_nemid\Element; | ||
|
||
use Drupal\Core\Form\FormStateInterface; | ||
|
||
/** | ||
* Provides a 'os2forms_nemid_company_floor'. | ||
* | ||
* @FormElement("os2forms_nemid_company_floor") | ||
* | ||
* @see \Drupal\Core\Render\Element\FormElement | ||
* @see https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Render%21Element%21FormElement.php/class/FormElement | ||
* @see \Drupal\Core\Render\Element\RenderElement | ||
* @see https://api.drupal.org/api/drupal/namespace/Drupal%21Core%21Render%21Element | ||
* @see \Drupal\os2forms_nemid\Element\NemidCompanyFloor | ||
*/ | ||
class NemidCompanyFloor extends NemidElementBase { | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function getInfo() { | ||
$class = get_class($this); | ||
return parent::getInfo() + [ | ||
'#process' => [ | ||
[$class, 'processNemidCompanyFloor'], | ||
[$class, 'processAjaxForm'], | ||
], | ||
'#element_validate' => [ | ||
[$class, 'validateNemidCompanyFloor'], | ||
], | ||
'#pre_render' => [ | ||
[$class, 'preRenderNemidCompanyFloor'], | ||
], | ||
'#theme' => 'input__os2forms_nemid_company_floor', | ||
]; | ||
} | ||
|
||
/** | ||
* Processes a 'os2forms_nemid_company_floor' element. | ||
*/ | ||
public static function processNemidCompanyFloor(&$element, FormStateInterface $form_state, &$complete_form) { | ||
// Here you can add and manipulate your element's properties and callbacks. | ||
return $element; | ||
} | ||
|
||
/** | ||
* Webform element validation handler for 'os2forms_nemid_company_floor'. | ||
*/ | ||
public static function validateNemidCompanyFloor(&$element, FormStateInterface $form_state, &$complete_form) { | ||
// Here you can add custom validation logic. | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public static function preRenderNemidCompanyFloor(array $element) { | ||
$element = parent::prerenderNemidElementBase($element); | ||
static::setAttributes($element, [ | ||
'form-text', | ||
'os2forms-nemid-company-floor', | ||
]); | ||
return $element; | ||
} | ||
|
||
} |
67 changes: 67 additions & 0 deletions
67
modules/os2forms_nemid/src/Element/NemidCompanyHouseNr.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
<?php | ||
|
||
namespace Drupal\os2forms_nemid\Element; | ||
|
||
use Drupal\Core\Form\FormStateInterface; | ||
|
||
/** | ||
* Provides a 'os2forms_nemid_company_house_nr'. | ||
* | ||
* @FormElement("os2forms_nemid_company_house_nr") | ||
* | ||
* @see \Drupal\Core\Render\Element\FormElement | ||
* @see https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Render%21Element%21FormElement.php/class/FormElement | ||
* @see \Drupal\Core\Render\Element\RenderElement | ||
* @see https://api.drupal.org/api/drupal/namespace/Drupal%21Core%21Render%21Element | ||
* @see \Drupal\os2forms_nemid\Element\NemidCompanyHouseNr | ||
*/ | ||
class NemidCompanyHouseNr extends NemidElementBase { | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function getInfo() { | ||
$class = get_class($this); | ||
return parent::getInfo() + [ | ||
'#process' => [ | ||
[$class, 'processNemidCompanyHouseNr'], | ||
[$class, 'processAjaxForm'], | ||
], | ||
'#element_validate' => [ | ||
[$class, 'validateNemidCompanyHouseNr'], | ||
], | ||
'#pre_render' => [ | ||
[$class, 'preRenderNemidCompanyHouseNr'], | ||
], | ||
'#theme' => 'input__os2forms_nemid_company_house_nr', | ||
]; | ||
} | ||
|
||
/** | ||
* Processes a 'os2forms_nemid_company_house_nr' element. | ||
*/ | ||
public static function processNemidCompanyHouseNr(&$element, FormStateInterface $form_state, &$complete_form) { | ||
// Here you can add and manipulate your element's properties and callbacks. | ||
return $element; | ||
} | ||
|
||
/** | ||
* Webform element validation handler for 'os2forms_nemid_company_house_nr'. | ||
*/ | ||
public static function validateNemidCompanyHouseNr(&$element, FormStateInterface $form_state, &$complete_form) { | ||
// Here you can add custom validation logic. | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public static function preRenderNemidCompanyHouseNr(array $element) { | ||
$element = parent::prerenderNemidElementBase($element); | ||
static::setAttributes($element, [ | ||
'form-text', | ||
'os2forms-nemid-company-house-nr', | ||
]); | ||
return $element; | ||
} | ||
|
||
} |
67 changes: 67 additions & 0 deletions
67
modules/os2forms_nemid/src/Element/NemidCompanyKommunekode.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
<?php | ||
|
||
namespace Drupal\os2forms_nemid\Element; | ||
|
||
use Drupal\Core\Form\FormStateInterface; | ||
|
||
/** | ||
* Provides a 'os2forms_nemid_company_kommunekode'. | ||
* | ||
* @FormElement("os2forms_nemid_company_kommunekode") | ||
* | ||
* @see \Drupal\Core\Render\Element\FormElement | ||
* @see https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Render%21Element%21FormElement.php/class/FormElement | ||
* @see \Drupal\Core\Render\Element\RenderElement | ||
* @see https://api.drupal.org/api/drupal/namespace/Drupal%21Core%21Render%21Element | ||
* @see \Drupal\os2forms_nemid\Element\NemidCompanyKommunekode | ||
*/ | ||
class NemidCompanyKommunekode extends NemidElementBase { | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function getInfo() { | ||
$class = get_class($this); | ||
return parent::getInfo() + [ | ||
'#process' => [ | ||
[$class, 'processNemidCompanyKommunekode'], | ||
[$class, 'processAjaxForm'], | ||
], | ||
'#element_validate' => [ | ||
[$class, 'validateNemidCompanyKommunekode'], | ||
], | ||
'#pre_render' => [ | ||
[$class, 'preRenderNemidCompanyKommunekode'], | ||
], | ||
'#theme' => 'input__os2forms_nemid_company_kommunekode', | ||
]; | ||
} | ||
|
||
/** | ||
* Processes a 'os2forms_nemid_company_kommunekode' element. | ||
*/ | ||
public static function processNemidCompanyKommunekode(&$element, FormStateInterface $form_state, &$complete_form) { | ||
// Here you can add and manipulate your element's properties and callbacks. | ||
return $element; | ||
} | ||
|
||
/** | ||
* Webform element validation for 'os2forms_nemid_company_kommunekode'. | ||
*/ | ||
public static function validateNemidCompanyKommunekode(&$element, FormStateInterface $form_state, &$complete_form) { | ||
// Here you can add custom validation logic. | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public static function preRenderNemidCompanyKommunekode(array $element) { | ||
$element = parent::prerenderNemidElementBase($element); | ||
static::setAttributes($element, [ | ||
'form-text', | ||
'os2forms-nemid-company-kommunekode', | ||
]); | ||
return $element; | ||
} | ||
|
||
} |
67 changes: 67 additions & 0 deletions
67
modules/os2forms_nemid/src/Element/NemidCompanyPostalCode.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
<?php | ||
|
||
namespace Drupal\os2forms_nemid\Element; | ||
|
||
use Drupal\Core\Form\FormStateInterface; | ||
|
||
/** | ||
* Provides a 'os2forms_nemid_company_postal_code'. | ||
* | ||
* @FormElement("os2forms_nemid_company_postal_code") | ||
* | ||
* @see \Drupal\Core\Render\Element\FormElement | ||
* @see https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Render%21Element%21FormElement.php/class/FormElement | ||
* @see \Drupal\Core\Render\Element\RenderElement | ||
* @see https://api.drupal.org/api/drupal/namespace/Drupal%21Core%21Render%21Element | ||
* @see \Drupal\os2forms_nemid\Element\NemidCompanyPostalCode | ||
*/ | ||
class NemidCompanyPostalCode extends NemidElementBase { | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function getInfo() { | ||
$class = get_class($this); | ||
return parent::getInfo() + [ | ||
'#process' => [ | ||
[$class, 'processNemidCompanyPostalCode'], | ||
[$class, 'processAjaxForm'], | ||
], | ||
'#element_validate' => [ | ||
[$class, 'validateNemidCompanyPostalCode'], | ||
], | ||
'#pre_render' => [ | ||
[$class, 'preRenderNemidCompanyPostalCode'], | ||
], | ||
'#theme' => 'input__os2forms_nemid_company_postal_code', | ||
]; | ||
} | ||
|
||
/** | ||
* Processes a 'os2forms_nemid_company_postal_code' element. | ||
*/ | ||
public static function processNemidCompanyPostalCode(&$element, FormStateInterface $form_state, &$complete_form) { | ||
// Here you can add and manipulate your element's properties and callbacks. | ||
return $element; | ||
} | ||
|
||
/** | ||
* Webform element validation for 'os2forms_nemid_company_postal_code'. | ||
*/ | ||
public static function validateNemidCompanyPostalCode(&$element, FormStateInterface $form_state, &$complete_form) { | ||
// Here you can add custom validation logic. | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public static function preRenderNemidCompanyPostalCode(array $element) { | ||
$element = parent::prerenderNemidElementBase($element); | ||
static::setAttributes($element, [ | ||
'form-text', | ||
'os2forms-nemid-company-postal-code', | ||
]); | ||
return $element; | ||
} | ||
|
||
} |
Oops, something went wrong.