本文整理汇总了PHP中FORM::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP FORM::__construct方法的具体用法?PHP FORM::__construct怎么用?PHP FORM::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FORM
的用法示例。
在下文中一共展示了FORM::__construct方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* @param APPLICATION $context Main application.
*/
public function __construct($context)
{
parent::__construct($context);
$field = new TEXT_FIELD();
$field->id = 'name';
$field->caption = 'Name';
$field->required = true;
$field->max_length = 100;
$this->add_field($field);
$field = new TEXT_FIELD();
$field->id = 'password';
$field->caption = 'Password';
$field->required = true;
$field->min_length = 1;
$field->max_length = 20;
$this->add_field($field);
$field = new BOOLEAN_FIELD();
$field->id = 'remember';
$field->caption = '';
$field->description = 'Remember me on this machine.';
$this->add_field($field);
$field = new TEXT_FIELD();
$field->id = 'last_page';
$field->caption = 'Last page';
$field->visible = false;
$this->add_field($field);
if ($this->login->is_anonymous()) {
$this->set_initial_focus('name');
}
}
示例2: __construct
/**
* @param CONTEXT $page
* @param THEME[] $themes List of available themes.
*/
public function __construct($page, $themes)
{
parent::__construct($page);
$this->_themes = $themes;
$field = new INTEGER_FIELD();
$field->id = 'page_number';
$field->caption = 'Page Number';
$field->min_value = 1;
$field->visible = false;
$this->add_field($field);
$field = new TEXT_FIELD();
$field->id = 'main_CSS_file_name';
$field->caption = 'Name';
$this->add_field($field);
$field = new TEXT_FIELD();
$field->id = 'font_name_CSS_file_name';
$field->caption = 'Font Name';
$this->add_field($field);
$field = new TEXT_FIELD();
$field->id = 'font_size_CSS_file_name';
$field->caption = 'Font Size';
$this->add_field($field);
$field = new BOOLEAN_FIELD();
$field->id = 'dont_apply_to_forms';
$field->caption = 'Form Styling';
$field->description = 'Don\'t apply theme to form controls.';
$this->add_field($field);
}
示例3: __construct
/**
* @param APPLICATION $context Main application.
*/
public function __construct($context)
{
parent::__construct($context);
$field = new TEXT_FIELD();
$field->id = 'name';
$field->caption = 'Name';
$field->required = true;
$field->visible = false;
$this->add_field($field);
$field = new TEXT_FIELD();
$field->id = 'password1';
$field->caption = 'Password';
$field->required = true;
$field->min_length = $this->app->user_options->minimum_password_length;
$field->max_length = 20;
$this->add_field($field);
$field = new TEXT_FIELD();
$field->id = 'password2';
$field->caption = 'Confirm';
$field->required = true;
$field->min_length = $this->app->user_options->minimum_password_length;
$field->max_length = 20;
$this->add_field($field);
$field = new BOOLEAN_FIELD();
$field->id = 'remember';
$field->caption = 'Remember me';
$field->description = 'Store your user information on this computer.';
$this->add_field($field);
}
示例4: __construct
/**
* @param CONTEXT $context
*/
public function __construct($context)
{
parent::__construct($context);
$field = new TEXT_FIELD();
$field->id = 'app_title';
$field->caption = 'Title';
$field->sticky = true;
$field->required = true;
$this->add_field($field);
$field = new TEXT_FIELD();
$field->id = 'app_id';
$field->caption = 'Identifier';
$field->sticky = true;
$field->required = true;
$this->add_field($field);
$field = new TEXT_FIELD();
$field->id = 'app_url';
$field->caption = 'URL';
$field->sticky = true;
$field->required = true;
$this->add_field($field);
$field = new TEXT_FIELD();
$field->id = 'app_folder';
$field->caption = 'Folder';
$field->sticky = true;
$field->required = true;
$this->add_field($field);
$field = new TEXT_FIELD();
$field->id = 'app_prefix';
$field->caption = 'Prefix';
$field->sticky = true;
$field->required = true;
$this->add_field($field);
$field = new TEXT_FIELD();
$field->id = 'folder_name';
$field->caption = 'Folder Name';
$field->sticky = true;
$field->required = true;
$this->add_field($field);
$field = new TEXT_FIELD();
$field->id = 'entry_name';
$field->caption = 'Entry Name';
$field->sticky = true;
$field->required = true;
$this->add_field($field);
$field = new TEXT_FIELD();
$field->id = 'author_name';
$field->caption = 'Author Name';
$field->sticky = true;
$field->required = true;
$this->add_field($field);
$field = new EMAIL_FIELD();
$field->id = 'author_email';
$field->caption = 'Author Email';
$field->sticky = true;
$field->required = true;
$this->add_field($field);
}
示例5: __construct
/**
* @param CONTEXT $context
*/
public function __construct($context)
{
parent::__construct($context);
$field = new TEXT_FIELD();
$field->id = 'test_name';
$field->caption = 'Test';
$field->min_value = 0;
$this->add_field($field);
}
示例6: __construct
/**
* @param APPLICATION $context Main application.
*/
public function __construct($context)
{
parent::__construct($context);
$field = new EMAIL_FIELD();
$field->id = 'email';
$field->caption = 'Email';
$field->visible = false;
$this->add_field($field);
$field = new TEXT_FIELD();
$field->id = 'panel';
$field->caption = 'Panel';
$field->visible = false;
$this->add_field($field);
$field = new ARRAY_FIELD();
$field->id = 'ids';
$field->caption = 'Ids';
$field->min_values = 0;
$this->add_field($field);
}
示例7:
function __construct($context)
{
parent::__construct($context);
$field = new INTEGER_FIELD();
$field->id = 'radio';
$field->caption = 'Radio';
$this->add_field($field);
$field = new TEXT_FIELD();
$field->id = 'name';
$field->caption = 'Name';
$field->required = true;
$this->add_field($field);
$this->set_value('name', 'Filler text');
$field = new MUNGER_TEXT_FIELD();
$field->id = 'description';
$field->caption = 'Description';
$this->add_field($field);
$this->set_value('description', 'Filler text that demonstrates which font is being used in longer, wrapping text.');
$field = new DATE_TIME_FIELD();
$field->id = 'date';
$field->caption = 'Date';
$this->add_field($field);
$this->set_value('date', new DATE_TIME());
$field = new BOOLEAN_FIELD();
$field->id = 'bool1';
$field->set_value(1);
$field->caption = 'Option 1';
$this->add_field($field);
$field = new BOOLEAN_FIELD();
$field->id = 'bool2';
$field->caption = 'Option 2';
$this->add_field($field);
$field = new ENUMERATED_FIELD();
$field->id = 'select';
$field->caption = 'Select';
$field->add_value(0);
$field->add_value(1);
$field->add_value(2);
$field->add_value(3);
$field->required = true;
$this->add_field($field);
}
示例8: __construct
/**
* @param APPLICATION $context Main application.
*/
public function __construct($context)
{
parent::__construct($context);
$field = new TEXT_FIELD();
$field->id = 'test_name';
$field->caption = 'Test Name';
$field->visible = false;
$this->add_field($field);
$field = new BOOLEAN_FIELD();
$field->id = 'testing';
$field->caption = 'Test Run Only';
$field->description = 'Runs through without actually changing anything; databases are untouched and mails are not sent.';
$this->add_field($field);
$field = new BOOLEAN_FIELD();
$field->id = 'console';
$field->caption = 'Emulate Command-Line';
$field->description = 'Configure the environment as if it was <strong>not</strong> running on an HTTP server.';
$this->add_field($field);
$field = new BOOLEAN_FIELD();
$field->id = 'verbose';
$field->caption = 'Verbose';
$field->description = 'Show database queries and other details. Use "debug" to show all messages.';
$this->add_field($field);
$field = new BOOLEAN_FIELD();
$field->id = 'stop_on_error';
$field->caption = 'Stop on Error';
$field->description = 'Abort execution of the task if an error occurs; turn this off to ignore spurious errors.';
$this->add_field($field);
$field = new BOOLEAN_FIELD();
$field->id = 'database';
$field->caption = 'Show Database Output';
$field->description = 'Shows queries executed against the database.';
$this->add_field($field);
$field = $this->field_at('debug');
$field->visible = true;
$field->description = 'Show all debugging output from all sub-systems. Similar to "verbose".';
}
示例9: __construct
/**
* @param APPLICATION $context Main application.
*/
public function __construct($context)
{
parent::__construct($context);
$field = new INTEGER_FIELD();
$field->id = 'id';
$field->caption = 'ID';
$field->min_value = 1;
$field->visible = false;
$this->add_field($field);
}
示例10: __construct
/**
* @param CONTEXT $context Attach to this object.
*/
public function __construct($context)
{
$this->_form_based_field_names[] = 'previewing';
parent::__construct($context);
}