本文整理汇总了PHP中Zend_Form_SubForm::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Form_SubForm::__construct方法的具体用法?PHP Zend_Form_SubForm::__construct怎么用?PHP Zend_Form_SubForm::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zend_Form_SubForm
的用法示例。
在下文中一共展示了Zend_Form_SubForm::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* 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: __construct
/**
* @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: __construct
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));
}
示例4: __construct
public function __construct($limitType, $label, $withOverage = true)
{
$this->limitType = $limitType;
$this->label = $label;
$this->withOverage = $withOverage;
parent::__construct();
}
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:7,代码来源:PartnerConfigurationLimitSubForm.php
示例5:
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: __construct
/**
* 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: __construct
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: __construct
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: __construct
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();
}
示例10: __construct
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: __construct
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: __construct
public function __construct($options = null)
{
// $this->_disabledDefaultActions = true;
parent::__construct($options);
}
示例13: __construct
public function __construct(Zend_Auth $auth)
{
$this->auth = $auth;
return parent::__construct();
}
示例14: __construct
public function __construct($absoluteType = Model_Core_Agent_AbsoluteType::ABSOLUTE)
{
$this->_absoluteType = $absoluteType;
return parent::__construct();
}
示例15: __construct
/**
* Constructor
*
* @param mixed $options
*/
public function __construct($options = null)
{
$this->addPrefixPaths(array(array('prefix' => 'Curry_Form', 'path' => 'Curry/Form/')));
parent::__construct($options);
}