本文整理汇总了PHP中Element::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Element::__construct方法的具体用法?PHP Element::__construct怎么用?PHP Element::__construct使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Element
的用法示例。
在下文中一共展示了Element::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct($name = null, $owner = null, $caption = null, $rows = null)
{
parent::__construct($name, $owner);
$this->tag = "table";
$this->summary = $this->caption = $caption;
$this->rows = $rows;
}
示例2:
function __construct($name = "", $note = "", $element = null, $parse = Element::PARSE_MODE_JAVA)
{
parent::__construct($parse);
$this->name = $name;
$this->note = $note;
$this->element = $element;
}
示例3: __construct
public function __construct()
{
parent::__construct();
// load widgetkit
require_once JPATH_ADMINISTRATOR . '/components/com_widgetkit/widgetkit.php';
$this->widgetkit = Widgetkit::getInstance();
}
示例4: __construct
/**
* Creates a new, empty form with some default attributes
*
* @param array $attributes
*/
public function __construct($attributes = array())
{
global $ID;
parent::__construct('form', $attributes);
// use the current URL as default action
if (!$this->attr('action')) {
$get = $_GET;
if (isset($get['id'])) {
unset($get['id']);
}
$self = wl($ID, $get, false, '&');
//attributes are escaped later
$this->attr('action', $self);
}
// post is default
if (!$this->attr('method')) {
$this->attr('method', 'post');
}
// we like UTF-8
if (!$this->attr('accept-charset')) {
$this->attr('accept-charset', 'utf-8');
}
// add the security token by default
$this->setHiddenField('sectok', getSecurityToken());
// identify this as a new form based form in HTML
$this->addClass('doku_form');
}
示例5: foreach
function __construct($variables)
{
global $parametersMod;
$this->regExpression = '/^([1-3][0-9]{3,3})-(0?[1-9]|1[0-2])-(0?[1-9]|[1-2][0-9]|3[0-1])\\s([0-1][0-9]|2[0-4]):([0-5][0-9]):([0-5][0-9])$/';
$this->regExpressionError = $parametersMod->getValue('developer', 'std_mod', 'admin_translations', 'incorrect_date_format');
$this->type = 'mysql';
if (!isset($variables['order'])) {
$variables['order'] = true;
}
parent::__construct($variables);
if (!isset($variables['dbField']) || $variables['dbField'] == '') {
$backtrace = debug_backtrace();
if (isset($backtrace[0]['file']) && $backtrace[0]['line']) {
trigger_error('ElementDateTime dbField parameter not set. (Error source: ' . $backtrace[0]['file'] . ' line: ' . $backtrace[0]['line'] . ' ) ');
} else {
trigger_error('ElementDateTime dbField parameter not set.');
}
exit;
}
foreach ($variables as $name => $value) {
switch ($name) {
case 'regExpressionError':
$this->regExpressionError = $value;
break;
case 'type':
$this->type = $value;
break;
case 'dbField':
$this->dbField = $value;
break;
}
}
}
示例6: __construct
/**
* @param array $config Configuration options
*/
public function __construct(array $config = [])
{
// Parent constructor
parent::__construct($config);
// Initialization
$this->addClasses(['oo-ui-layout']);
}
示例7: __construct
public function __construct($name, $config)
{
$this->_config['noLabel'] = true;
parent::__construct($name, $config);
$this->_tag = 'button';
$this->_defaultTemplateFile = 'slimform/partial/form/button.twig';
}
示例8: __construct
public function __construct($id = '', $r, $cx, $cy)
{
parent::__construct($id);
$this->r = $r;
$this->cx = $cx;
$this->cy = $cy;
}
示例9: __construct
/**
* @param string|Element $label Defines the content of the element. If `$label` is not
* a {@link Element} instance it is escaped.
* @param string $href URI for linked resource.
* @param array $attributes Optional attributes.
*/
public function __construct($label, $href = '#', array $attributes = [])
{
if (!$label instanceof HTMLStringInterface) {
$label = escape(t($label));
}
parent::__construct('a', $attributes + ['href' => $href, self::INNER_HTML => $label]);
}
示例10: __construct
public function __construct($name = null, $value = null, array $options = array())
{
parent::__construct($name, null, $options);
if ($value !== null) {
$this->data = $value;
}
}
示例11: DB
function __construct($request)
{
parent::__construct($request);
$this->dispatchArray['post'][false]['insertUserIntoGroup'] = 'insertUserIntoGroup';
$this->dispatchArray['post'][false]['insertGroup'] = 'insertGroup';
$this->dispatchArray['post'][false]['addContact'] = 'addContact';
//$this->dispatchArray['get'][false]['addContact'] = 'addContact';
$this->dispatchArray['get'][false]['retrieveAllGroupsMembers'] = 'retrieveAllGroupsMembers';
$this->dispatchArray['get'][false]['insertGroup'] = 'insertGroup';
$this->dispatchArray['get'][false]['distanceFromContact'] = 'distanceFromContact';
$this->dispatchArray['get'][true]['modifyGroup'] = 'modifyGroup';
$this->dispatchArray['get'][true]['deleteContact'] = 'deleteContact';
$this->dispatchArray['get'][true]['modifyContact'] = 'modifyContact';
$this->dispatchArray['get'][true]['deleteGroup'] = 'deleteGroup';
$this->dispatchArray['get'][false]['insertUserIntoGroup'] = 'insertUserIntoGroup';
$this->dispatchArray['get'][true]['userToUser'] = 'userToUser';
#HERE
$this->dispatchArray['get'][false]['deleteMultipleGroups'] = 'deleteMultipleGroups';
#HERE
$this->dispatchArray['put'][true]['modifyGroup'] = 'modifyGroup';
$this->dispatchArray['put'][true]['modifyContact'] = 'modifyContact';
$this->dispatchArray['delete'][true]['deleteGroup'] = 'deleteGroup';
$this->dispatchArray['delete'][true]['deleteContact'] = 'deleteContact';
$this->dispatchArray['delete'][false]['deleteContactFromGroup'] = 'deleteContactFromGroup';
#HERE
$this->dispatchArray['post'][true][null] = 'methodNotImplemented';
$this->dispatchArray['get'][false][null] = 'methodNotImplemented';
$this->dispatchArray['put'][true][null] = 'methodNotImplemented';
$this->dispatchArray['delete'][false][null] = 'methodNotImplemented';
$this->dispatchArray['delete'][true][null] = 'methodNotImplemented';
$this->nebulaDB = new DB();
}
示例12: foreach
function __construct($variables)
{
if (!isset($variables['order'])) {
$variables['order'] = true;
}
parent::__construct($variables);
if (!isset($variables['dbField']) || $variables['dbField'] == '') {
$backtrace = debug_backtrace();
if (isset($backtrace[0]['file']) && $backtrace[0]['line']) {
trigger_error('ElementBool dbField parameter not set. (Error source: ' . $backtrace[0]['file'] . ' line: ' . $backtrace[0]['line'] . ' ) ');
} else {
trigger_error('ElementBool dbField parameter not set.');
}
exit;
}
foreach ($variables as $name => $value) {
switch ($name) {
case 'dbField':
$this->dbField = $value;
break;
case 'defaultValue':
if ($value) {
$this->defaultValue = 1;
} else {
$this->defaultValue = 0;
}
break;
}
}
}
示例13: __construct
/**
* @param string $label
* @param array $attributes
*/
public function __construct($label, array $attributes = [])
{
if (is_string($label)) {
$label = escape(t($label, [], ['scope' => 'button']));
}
parent::__construct('div', $attributes + [self::INNER_HTML => $label]);
}
示例14: __construct
public function __construct($name, $text, $type = 'submit', $id = null, $class = null)
{
parent::__construct($name, $id, $class);
$this->_text = $text;
$this->_type = $type;
return $this;
}
示例15: __construct
public function __construct($attributes, $formName, $keepValues = false)
{
parent::__construct($attributes, $formName, $keepValues);
// Setando os options do select através do banco de dados:
$this->setOptions();
$this->setPrefixAndSuffix();
}