本文整理汇总了PHP中Kwc_Abstract_Form::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Kwc_Abstract_Form::__construct方法的具体用法?PHP Kwc_Abstract_Form::__construct怎么用?PHP Kwc_Abstract_Form::__construct使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Kwc_Abstract_Form
的用法示例。
在下文中一共展示了Kwc_Abstract_Form::__construct方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct($name, $class)
{
parent::__construct($name, $class);
$form = Kwc_Abstract_Form::createChildComponentForm($class, '-downloadTag');
$this->add($form);
$this->add(new Kwf_Form_Field_TextField('infotext', trlKwf('Description')))->setWidth(300)->setAutoFillWithFilename('filenameWithExt')->setHelpText(trlKwf('Text, shown after the file icon (automatically generated) and used as link for downloading the file.'))->setAllowBlank(false);
}
示例2: __construct
public function __construct($name, $class, $id = null)
{
parent::__construct($name, $class, $id);
$this->add(new Kwf_Form_Field_UrlField('target', trlKwf('Url')))->setWidth(450)->setHelpText(trlKwf('Enter the Internetaddress including "http://". For example if you want to link to Google.com, type "http://www.google.com" into the textfield.'))->setAllowBlank(false)->setVtype('urltel');
if (Kwc_Abstract::getSetting($class, 'hasPopup')) {
// cards container erstellen und zu form hinzufügen
$cards = $this->add(new Kwf_Form_Container_Cards('open_type', trlKwf('Open in')));
$cards->getCombobox()->setAllowBlank(false);
$card = $cards->add();
$card->setTitle(trlKwf('Same window'));
$card->setName('self');
$card = $cards->add();
$card->setTitle(trlKwf('New window'));
$card->setName('blank');
$card = $cards->add();
$card->setTitle(trlKwf('Popup'));
$card->setName('popup');
$card->add(new Kwf_Form_Field_TextField('width', 'Width'))->setDefaultValue(400)->setAllowBlank(false)->setVtype('alphanum');
$card->add(new Kwf_Form_Field_TextField('height', 'Height'))->setDefaultValue(400)->setAllowBlank(false)->setVtype('alphanum');
$card->add(new Kwf_Form_Field_Checkbox('menubar', 'Menubar'));
$card->add(new Kwf_Form_Field_Checkbox('toolbar', 'Toolbar'));
$card->add(new Kwf_Form_Field_Checkbox('locationbar', 'Locationbar'));
$card->add(new Kwf_Form_Field_Checkbox('statusbar', 'Statusbar'));
$card->add(new Kwf_Form_Field_Checkbox('scrollbars', 'Scrollbars'));
$card->add(new Kwf_Form_Field_Checkbox('resizable', 'Resizable'));
}
}
示例3: __construct
public function __construct($name, $class, $id = null)
{
parent::__construct($name, $class, $id);
$this->setXtype('Kwc.Basic.DownloadTag');
$this->fields->add(new Kwf_Form_Field_File('File', trlKwf('File')))->setDirectory('BasicDownloadTag')->setAllowOnlyImages(false)->setAllowBlank(false);
$this->fields->add(new Kwf_Form_Field_TextField('filename', trlKwf('Filename')))->setVtype('alphanum')->setAutoFillWithFilename('filename')->setHelpText(hlpKwf('kwf_download_filename'))->setWidth(300)->setAllowBlank(false);
}
示例4: __construct
public function __construct($name, $class)
{
parent::__construct($name, $class);
$this->setLabelWidth(200);
$this->fields->add(new Kwf_Form_Field_TextField('disclaimer_name', trlKwf('Disclaimer name')))->setWidth(300);
$this->fields->add(new Kwf_Form_Field_Select('disclaimer_type', trlKwf('Disclaimer type')))->setValues($this->_getDisclaimerText())->setWidth(300);
}
示例5: __construct
public function __construct($name, $class)
{
parent::__construct($name, $class);
$form = Kwc_Abstract_Form::createChildComponentForm($class, '-downloadTag');
$this->add($form);
$this->add(new Kwf_Form_Field_TextField('infotext', trlKwf('Descriptiontext')))->setWidth(300)->setHelpText(hlpKwf('kwc_download_linktext'));
$this->add(new Kwf_Form_Field_ShowField('original_infotext', trlKwf('Original')))->setData(new Kwf_Data_Trl_OriginalComponent('infotext'));
}
示例6: __construct
public function __construct($name, $class)
{
parent::__construct($name, $class);
if (!$this->getModel()) {
$this->setModel(new Kwf_Model_FnF());
$this->setCreateMissingRow(true);
}
}
示例7: __construct
public function __construct($name, $class)
{
parent::__construct($name, $class);
$form = Kwc_Abstract_Form::createChildComponentForm($class, '-downloadTag');
$this->add($form);
$this->add(new Kwf_Form_Field_TextField('infotext', trlKwf('Descriptiontext')))->setWidth(300)->setHelpText(trlKwf('Text, shown after the file icon (automatically generated) and used as link for downloading the file.'));
$this->add(new Kwf_Form_Field_ShowField('original_infotext', trlKwf('Original')))->setData(new Kwf_Data_Trl_OriginalComponent('infotext'));
}
示例8: __construct
public function __construct($name, $class)
{
parent::__construct($name, $class);
$sections = array();
$vars = new Zend_Config_Ini('assetVariables.ini');
foreach ($vars as $i => $j) {
$sections[$i] = $i == 'web' ? trlKwf('Standard') : $i;
}
$this->fields->add(new Kwf_Form_Field_Select('section', trlKwf('Section')))->setAllowBlank(false)->setValues($sections)->setDefaultValue('web')->setWidth(120);
}
示例9: __construct
public function __construct($name, $class)
{
parent::__construct($name, $class);
$this->setLabelWidth(120);
$this->fields->add(new Kwf_Form_Field_GoogleMapsField('coordinates', trlKwf('Coordinates')));
$this->fields->add(new Kwf_Form_Field_Select('zoom', trlKwf('Zoomlevel')))->setAllowBlank(false)->setValues($this->_getZoomLevels())->setWidth(120);
$this->fields->add(new Kwf_Form_Field_NumberField('width', trlKwf('Width')))->setAllowNegative(false)->setAllowDecimals(false)->setAllowBlank(true)->setWidth(120)->setComment(trlKwfStatic('optional, if empty full width'));
$this->fields->add(new Kwf_Form_Field_NumberField('height', trlKwf('Height')))->setAllowNegative(false)->setAllowDecimals(false)->setAllowBlank(false)->setWidth(120);
$this->fields->add(new Kwf_Form_Field_Select('zoom_properties', trlKwf('Zoom properties')))->setValues(array('0' => trlKwfStatic('Move + Zoom'), '1' => trlKwfStatic('Move + Zoom (without zoombar)'), '2' => trlKwfStatic('None')))->setWidth(300)->setAllowBlank(false);
$this->fields->add(new Kwf_Form_Field_Checkbox('scale', trlKwf('Scale')));
$this->fields->add(new Kwf_Form_Field_Checkbox('satelite', trlKwf('Satelitemap')));
$this->fields->add(new Kwf_Form_Field_Checkbox('overview', trlKwf('Overviewmap')));
$this->fields->add(new Kwf_Form_Field_Checkbox('routing', trlKwf('Routing')));
$this->fields->add(new Kwf_Form_Field_Checkbox('scrollwheel', trlKwf('Enable Scrollwheel to zoom')));
$form = Kwc_Abstract_Form::createChildComponentForm($class, '-text');
$form->fields->getByName('content')->setHeight(170);
$this->fields->add($form);
}
示例10: __construct
public function __construct($name, $class, $id = null)
{
$this->setModel(Kwc_Basic_Text_Component::createOwnModel($class));
parent::__construct($name, $class, $id);
$field = new Kwf_Form_Field_HtmlEditor('content', trlKwf('Text'));
$field->setData(new Kwf_Data_Kwc_ComponentIds('content'));
$field->setHideLabel(true);
$ignoreSettings = array('tablename', 'componentName', 'default', 'assets', 'assetsAdmin', 'placeholder', 'plugins');
$c = strpos($class, '.') ? substr($class, 0, strpos($class, '.')) : $class;
foreach (call_user_func(array($c, 'getSettings')) as $key => $val) {
if (!in_array($key, $ignoreSettings)) {
$method = 'set' . ucfirst($key);
$field->{$method}($val);
}
}
$generators = Kwc_Abstract::getSetting($this->getClass(), 'generators');
$classes = $generators['child']['component'];
if ($classes['link']) {
$cfg = new Kwf_Component_Abstract_ExtConfig_Form($classes['link']);
$c = $cfg->getConfig(Kwf_Component_Abstract_ExtConfig_Abstract::TYPE_DEFAULT);
$field->setLinkComponentConfig($c['form']);
}
if ($classes['image']) {
$c = Kwc_Admin::getInstance($classes['image'])->getExtConfig();
$field->setImageComponentConfig($c['form']);
}
if ($classes['download']) {
$c = Kwc_Admin::getInstance($classes['download'])->getExtConfig();
$field->setDownloadComponentConfig($c['form']);
}
if (Kwc_Abstract::getSetting($this->getClass(), 'enableStylesEditor')) {
$admin = Kwc_Admin::getInstance($class);
$field->setStylesEditorConfig(array('xtype' => 'kwc.basic.text.styleseditor', 'blockStyleUrl' => $admin->getControllerUrl('BlockStyle'), 'inlineStyleUrl' => $admin->getControllerUrl('InlineStyle'), 'masterStyleUrl' => $admin->getControllerUrl('MasterStyle')));
}
$t = Kwf_Model_Abstract::getInstance(Kwc_Abstract::getSetting($class, 'stylesModel'));
$field->setStyles($t->getStyles());
$field->setComponentClass($class);
$field->setControllerUrl(Kwc_Admin::getInstance($class)->getControllerUrl());
$this->fields->add($field);
$this->setAssetsPackage(Kwf_Assets_Package_Default::getInstance('Frontend'));
}
示例11: __construct
public function __construct($name, $class, $id = null)
{
parent::__construct($name, $class, $id);
$this->add(new Kwf_Form_Field_Select('anchor', trlKwf('Anchor')))->setValues(Kwc_Admin::getInstance($class)->getControllerUrl('Anchors') . '/json-data')->setShowNoSelection(true);
}
示例12: __construct
public function __construct($name, $class, $id = null)
{
parent::__construct($name, $class, $id);
$this->add(new Kwf_Form_Field_PageSelect('target', trlKwf('Target')))->setControllerUrl(Kwc_Admin::getInstance($class)->getControllerUrl('Pages'))->setWidth(233)->setAllowBlank(false);
}
示例13: __construct
public function __construct($name, $class)
{
parent::__construct($name, $class);
$this->setProperty('class', $class);
$this->add($this->_getMultiFields());
}
示例14: __construct
public function __construct($name, $class)
{
parent::__construct($name, $class);
$this->fields->add(new Kwf_Form_Field_Select('directory_component_id', trlKwf('Show'), 300))->setDisplayField('title')->setStoreUrl(Kwc_Admin::getInstance($class)->getControllerUrl('Directories') . '/json-data');
}