本文整理汇总了PHP中HiddenField::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP HiddenField::__construct方法的具体用法?PHP HiddenField::__construct怎么用?PHP HiddenField::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HiddenField
的用法示例。
在下文中一共展示了HiddenField::__construct方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct($name, $title = "", $value = "", $width = 1140, $height = 600, $baseImages = null)
{
$this->width = $width;
$this->height = $height;
$this->baseImages = $baseImages;
parent::__construct($name, $title, $value);
}
示例2: __construct
/**
*
* @param GridField $name
* @param string $data - json encoded string
*/
public function __construct($grid, $value = null)
{
$this->grid = $grid;
if ($value) {
$this->setValue($value);
}
parent::__construct($grid->getName() . '[GridState]');
}
示例3: __construct
public function __construct($name, $title = null, $value = "", $form = null)
{
// naming with underscores to prevent values from actually being saved somewhere
$this->fieldLatitude = new HiddenField("{$name}[Latitude]", null);
$this->fieldLongditude = new HiddenField("{$name}[Longditude]", null);
$this->fieldPositionSet = new HiddenField("{$name}[PositionSet]", null);
$this->fieldPositionSet->setValue(0);
parent::__construct($name, $title, null, $form);
$this->setValue($value);
}
示例4: __construct
public function __construct($name, $title = null, $value = null, $mapping = [], $identifier = null)
{
if ($value && $value instanceof \DataObjectInterface) {
$this->recordClass = get_class($value);
} elseif (\ClassInfo::exists($name) && singleton($name) instanceof \DataObjectInterface) {
$this->recordClass = $name;
}
$this->mapping = $mapping;
$this->identifier = $identifier;
$this->doNotMapTo();
parent::__construct($name, $title);
}
示例5:
/**
* Returns an input field, class="text" and type="text" with an optional maxlength
*/
function __construct($name, $title = null, $flickrPhoto = '', $maxLength = null, $form = null)
{
$this->maxLength = $maxLength;
parent::setTemplate('FLickrPhotoSelectionField');
$value = '';
if ($flickrPhoto) {
$value = $flickrPhoto->ID;
$this->flickrTitle = $flickrPhoto->Title;
$this->flickrID = $flickrPhoto->FlickrID;
$this->mediumURL = $flickrPhoto->MediumURL;
}
$this->addExtraClass('flickrPhotoSelectionField');
parent::__construct($name, $title, $value, $form);
}
示例6:
function __construct($name, $title = null, $value = '')
{
parent::__construct($name, $title, $value);
}
示例7: __construct
public function __construct($name, $title, $className = "SiteTree", $label = "Title", $val = null, $form = null)
{
parent::__construct($name, $title, $val, $form);
$this->labelField = $label;
$this->sourceClass = $className;
}
示例8:
/**
* Creates a new optionset field for order modifers with the naming convention
* Modifiers[ClassName] where ClassName is name of modifier class.
*
* @param name The field name, needs to be the class name of the class that is going to be the modifier
* @param title The field title
* @param source An map of the dropdown items
* @param value The current value
* @param form The parent form
*/
function __construct($modifier, $title = null, $value = "", $maxLength = null, $form = null)
{
$name = "Modifiers[{$modifier->ClassName}]";
$this->modifier = $modifier;
parent::__construct($name, $title, $value, $maxLength, $form);
}
示例9:
/**
* Creates a new optionset field for order modifers with the naming convention
* Modifiers[ClassName] where ClassName is name of modifier class.
*
* @param name The field name, needs to be the class name of the class that is going to be the modifier
* @param title The field title
* @param source An map of the dropdown items
* @param value The current value
* @param form The parent form
*/
function __construct($modifier, $title = null, $value = "", $maxLength = null, $form = null)
{
$name = "Modifiers[" . get_class($modifier) . "]";
$this->modifier = $modifier;
parent::__construct($name, $title, $value, $maxLength, $form);
}