for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* BB's Zend Framework 2 Components
*
* AdminModule
* @package [MyApplication]
* @package BB's Zend Framework 2 Components
* @package AdminModule
* @author Björn Bartels <[email protected]>
* @link https://gitlab.bjoernbartels.earth/groups/zf2
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
* @copyright copyright (c) 2016 Björn Bartels <[email protected]>
*/
namespace Admin\Form;
use Zend\Form\Form;
use Admin\Module;
class ApplicationsForm extends Form
{
public function __construct($name = null)
// we want to ignore the name passed
parent::__construct('applications');
$oModule = new Module();
$cfg = $oModule->getConfig();
$cfg
$this->setAttribute('method', 'post');
$this->add(
array(
'name' => 'application_id',
'attributes' => array(
'type' => 'hidden',
),
)
);
'name' => 'name',
'type' => 'text',
'options' => array(
'label' => 'name',
'name' => 'shortname',
'label' => 'shortname',
'name' => 'path',
'label' => 'path',
'name' => 'url',
'type' => 'url',
'label' => 'url',
'name' => 'email',
'type' => 'email',
'label' => 'admin email',
'name' => 'client_id',
'type' => 'select',
'options' => array(),
'label' => 'client',
'name' => 'submit',
'type' => 'submit',
'value' => 'save',
'id' => 'submitbutton',
'label' => 'save',
'name' => 'reset',
'type' => 'reset',
'value' => 'reset',
'id' => 'resetbutton',
'label' => 'reset',
}