/**
  * Constructor
  */
 public function __construct($options = null)
 {
     $this->core = Zend_Registry::get('Core');
     /**
      * Zend_Form_SubForm
      */
     parent::__construct($options);
     /**
      * Use our own PluginLoader
      */
     $objLoader = new PluginLoader();
     $objLoader->setPluginLoader($this->getPluginLoader(PluginLoader::TYPE_FORM_ELEMENT));
     $objLoader->setPluginType(PluginLoader::TYPE_FORM_ELEMENT);
     $this->setPluginLoader($objLoader, PluginLoader::TYPE_FORM_ELEMENT);
     /**
      * clear all decorators
      */
     $this->clearDecorators();
     /**
      * add standard decorators
      */
     $this->addDecorator('FormElements')->addDecorator('Tab');
     /**
      * add prefix path to own elements
      */
     //$this->addPrefixPath('Form_Element', '', 'element');
     /**
      * elements prefixes
      */
     $this->addElementPrefixPath('Form_Decorator', dirname(__FILE__) . '/decorators/', 'decorator');
     /**
      * regions prefixes
      */
     $this->addDisplayGroupPrefixPath('Form_Decorator', dirname(__FILE__) . '/decorators/');
 }
Пример #2
0
 /**
  * @param mixed $backendApplicationCode
  * @param array $options
  */
 public function __construct($options = null, $backendApplicationId = 0)
 {
     $this->_backendApplicationId = $backendApplicationId;
     $this->_dictionaryAdapter = new Base_Dictionary($backendApplicationId);
     $this->addPrefixPath('Base_Form_Element', 'Base/Form/Element', 'ELEMENT');
     parent::__construct($options);
 }
Пример #3
0
 public function __construct($key, $options = null)
 {
     parent::__construct($options);
     $this->addElement('textarea', 'en', array('label' => 'en'));
     $this->addElement('textarea', 'de', array('label' => 'de'));
     $this->addDisplayGroup(array('de', 'en'), $key, array('legend' => $key));
 }
 public function __construct($limitType, $label, $withOverage = true)
 {
     $this->limitType = $limitType;
     $this->label = $label;
     $this->withOverage = $withOverage;
     parent::__construct();
 }
Пример #5
0
 function __construct($options = null)
 {
     $this->addPrefixPath('ZendX_JQuery_Form_', 'ZendX/JQuery/Form/');
     $this->addPrefixPath('HausDesign_JQuery_Form_', 'HausDesign/JQuery/Form/');
     $this->addPrefixPath('HausDesign_Form', 'HausDesign/Form/');
     $this->addPrefixPath('Application_Form', 'Application/Form/');
     parent::__construct($options);
 }
Пример #6
0
 /**
  * Constructor
  *
  * @param  array|Zend_Config|null $options
  * @return void
  */
 public function __construct($options = null)
 {
     $this->addPrefixPath('Zend_Dojo_Form_Decorator', 'Zend/Dojo/Form/Decorator', 'decorator')
          ->addPrefixPath('Zend_Dojo_Form_Element', 'Zend/Dojo/Form/Element', 'element')
          ->addElementPrefixPath('Zend_Dojo_Form_Decorator', 'Zend/Dojo/Form/Decorator', 'decorator')
          ->addDisplayGroupPrefixPath('Zend_Dojo_Form_Decorator', 'Zend/Dojo/Form/Decorator')
          ->setDefaultDisplayGroupClass('Zend_Dojo_Form_DisplayGroup');
     parent::__construct($options);
 }
Пример #7
0
 public function __construct($option)
 {
     $this->_option = $option;
     if (isset($option['request'])) {
         $this->_oRequest = $option['request'];
         unset($option['request']);
     } else {
         throw new Exception('Obiekt requestu wymagany!');
     }
     parent::__construct($option);
 }
Пример #8
0
 public function __construct($name = null, $columns = null, $data = null, $recurse = true, $parent = null, $scaffold = false)
 {
     parent::__construct($name);
     global $gANNOTATION_KEYS;
     $this->annotationKeys = $gANNOTATION_KEYS;
     if ($scaffold) {
         $this->isScaffolding = $scaffold;
         $this->scaffoldingFormDocBlock = new Zend_CodeGenerator_Php_Docblock(array('shortDescription' => 'Scaffolding Form', 'longDescription' => 'This is a scaffolding class generated with Awe Scaffolding Generator.', 'tags' => array(array('name' => 'version', 'description' => '$Rev:$'), array('name' => 'license', 'description' => 'New BSD'))));
         $this->scaffoldingForm = new Zend_CodeGenerator_Php_Class();
         $this->scaffoldingForm->setName('Foo')->setDocblock($this->scaffoldingFormDocBlock);
         $this->scaffoldingFormInitMethodBody = '';
     }
     // setup params
     $this->recurseSubEntities = $recurse;
     $this->repopData = $data;
     $this->parentEntity = $parent;
     $this->entityColumns = $columns;
     $this->autoSubForms = array();
     // setup doctrine
     $this->_doctrine = \Zend_Registry::get('doctrineEm');
     $this->_reader = \Zend_Registry::get('doctrineAr');
     // Main Loop
     if ($scaffold) {
         if ($recurse) {
             $this->addSaveButton('upper_submit');
         }
         foreach ($columns as $def) {
             $this->parseScaffold($def);
         }
         if ($recurse) {
             $this->addSaveButton('lower_submit');
         }
         $this->scaffoldingForm->setMethods(array(new Zend_CodeGenerator_Php_Method(array('name' => 'init', 'parameters' => array(array('name' => 'bar')), 'body' => $this->scaffoldingFormInitMethodBody, 'docblock' => new Zend_CodeGenerator_Php_Docblock(array('shortDescription' => 'Initialize and setup the form'))))));
         $output = $this->scaffoldingForm->generate();
         $this->scaffolding = $output;
     } else {
         if ($recurse) {
             $this->addSaveButton('upper_submit');
         }
         foreach ($columns as $name => $def) {
             $elementType = $this->parseElementType($def);
             $this->parseElement($def, $elementType);
         }
         if ($recurse) {
             $this->addSaveButton('lower_submit');
         }
     }
 }
Пример #9
0
 public function __construct($name = null, $columns = null, $data = null, $recurse = true, $parent = null)
 {
     // initialize parent form
     parent::__construct($name);
     // setup params
     $this->isRestful = $name == 'rest_entity' ? true : false;
     $this->recurseSubEntities = $recurse;
     $this->repopData = $data;
     $this->parentEntity = $parent;
     $this->entityColumns = $columns;
     $this->autoSubForms = array();
     // setup doctrine
     $this->_doctrine = \Zend_Registry::get('doctrineEm');
     $this->_reader = \Zend_Registry::get('doctrineAr');
     $this->buildAutoForm();
 }
 public function __construct($options = array())
 {
     parent::__construct($options);
     $to = $this->createElement('text', 'to', array('label' => 'To:'));
     $to->setRequired(true)->setAttrib('maxlength', '255')->setAttrib('size', '40')->addFilter('StripTags')->addFilter('StringTrim')->setDescription('Seperate multiple email addresses by comma.');
     $from = $this->createElement('text', 'from', array('label' => 'From Email Address:'));
     $from->setRequired(true)->setAttrib('maxlength', '255')->setAttrib('size', '40')->addFilter('StripTags')->addFilter('StringTrim');
     $fromName = $this->createElement('text', 'fromName', array('label' => 'From Display Name:'));
     $fromName->setRequired(false)->setAttrib('maxlength', '255')->setAttrib('size', '40')->addFilter('StripTags')->addFilter('StringTrim');
     $subject = $this->createElement('text', 'subject', array('label' => 'Subject:'));
     $subject->setRequired(true)->setAttrib('maxlength', '255')->setAttrib('size', '40')->addFilter('StripTags')->addFilter('StringTrim');
     $body = $this->createElement('textarea', 'body', array('label' => 'Message:'));
     $body->setRequired(true)->setAttrib('rows', '10')->addFilter('StripTags')->addFilter('StringTrim');
     $this->addElements(array($to, $from, $fromName, $subject, $body));
     return $this;
 }
Пример #11
0
 public function __construct($options = null)
 {
     parent::__construct($options);
     $this->setName('attributes');
     $this->setIsArray(true);
     $attributename = new Zend_Form_Element_Text(Model_ClassGenerator_FormToClass::$nameKey);
     $attributename->setLabel('Name')->setRequired(true)->addValidator('NotEmpty', true);
     $attributeVisibility = new Zend_Form_Element_Select(Model_ClassGenerator_FormToClass::$visibilityKey);
     $attributeVisibility->addMultiOption(Zend_CodeGenerator_Php_Member_Abstract::VISIBILITY_PRIVATE, Zend_CodeGenerator_Php_Member_Abstract::VISIBILITY_PRIVATE)->addMultiOption(Zend_CodeGenerator_Php_Member_Abstract::VISIBILITY_PROTECTED, Zend_CodeGenerator_Php_Member_Abstract::VISIBILITY_PROTECTED)->addMultiOption(Zend_CodeGenerator_Php_Member_Abstract::VISIBILITY_PUBLIC, Zend_CodeGenerator_Php_Member_Abstract::VISIBILITY_PUBLIC)->setLabel('Visibility')->setRequired(true)->addValidator('NotEmpty', true);
     $attributeType = new Zend_Form_Element_Select(Model_ClassGenerator_FormToClass::$typeKey);
     $attributeType->addMultiOption('', '---')->addMultiOption(Zend_CodeGenerator_Php_Property_DefaultValue::TYPE_ARRAY, Zend_CodeGenerator_Php_Property_DefaultValue::TYPE_ARRAY)->addMultiOption(Zend_CodeGenerator_Php_Property_DefaultValue::TYPE_BOOL, Zend_CodeGenerator_Php_Property_DefaultValue::TYPE_BOOL)->addMultiOption(Zend_CodeGenerator_Php_Property_DefaultValue::TYPE_FLOAT, Zend_CodeGenerator_Php_Property_DefaultValue::TYPE_FLOAT)->addMultiOption(Zend_CodeGenerator_Php_Property_DefaultValue::TYPE_INTEGER, Zend_CodeGenerator_Php_Property_DefaultValue::TYPE_INTEGER)->addMultiOption(Zend_CodeGenerator_Php_Property_DefaultValue::TYPE_STRING, Zend_CodeGenerator_Php_Property_DefaultValue::TYPE_STRING)->addMultiOption('mixed', 'mixed')->setLabel('Type');
     $attributeComment = new Zend_Form_Element_Textarea(Model_ClassGenerator_FormToClass::$commentKey);
     $attributeComment->setLabel('Comment')->setAttrib('cols', '50')->setAttrib('rows', '4');
     $attributeColumn = new Zend_Form_Element_Text(Model_ClassGenerator_FormToClass::$columnKey);
     $attributeColumn->setLabel('Column');
     $attributeColumnSerial = new Zend_Form_Element_Checkbox(Model_ClassGenerator_FormToClass::$serialKey);
     $attributeColumnSerial->setLabel('Is serial');
     $attributeColumnPkey = new Zend_Form_Element_Checkbox(Model_ClassGenerator_FormToClass::$pkeyKey);
     $attributeColumnPkey->setLabel('Is primary key');
     $this->addElements(array($attributename, $attributeVisibility, $attributeType, $attributeComment, $attributeColumn, $attributeColumnSerial, $attributeColumnPkey));
 }
Пример #12
0
 public function __construct($options = null)
 {
     //        $this->_disabledDefaultActions = true;
     parent::__construct($options);
 }
Пример #13
0
 public function __construct(Zend_Auth $auth)
 {
     $this->auth = $auth;
     return parent::__construct();
 }
Пример #14
0
 public function __construct($absoluteType = Model_Core_Agent_AbsoluteType::ABSOLUTE)
 {
     $this->_absoluteType = $absoluteType;
     return parent::__construct();
 }
Пример #15
0
 /**
  * Constructor
  *
  * @param mixed $options
  */
 public function __construct($options = null)
 {
     $this->addPrefixPaths(array(array('prefix' => 'Curry_Form', 'path' => 'Curry/Form/')));
     parent::__construct($options);
 }
Пример #16
0
 public function __construct($options = NULL)
 {
     parent::__construct($options);
     $this->setDisableTranslator(true);
 }
Пример #17
0
 public function __construct($role = Model_Core_Agent_UserRole::BASIC)
 {
     $this->_role = $role;
     return parent::__construct();
 }