本文整理汇总了PHP中FormAction::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP FormAction::__construct方法的具体用法?PHP FormAction::__construct怎么用?PHP FormAction::__construct使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FormAction
的用法示例。
在下文中一共展示了FormAction::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
/**
* Create a new action button.
* @param action The method to call when the button is clicked
* @param title The label on the button
* @param image The default image to display
* @param hoverImage The image to display on hover
* @param form The parent form, auto-set when the field is placed inside a form
*/
function __construct($action, $title = "", $image = "", $hoverImage = null, $className = null, $form = null)
{
$this->image = $image;
$this->hoverImage = $hoverImage;
$this->className = $className;
parent::__construct($action, $title, $form);
}
示例2:
function __construct($link = "", $title = "", $form = null, $extraData = null, $extraClass = 'roundedButton')
{
if (!$title) {
$title = _t('CancelFormAction.CANCEL', 'Cancel');
}
$this->setLink($link);
parent::__construct('CancelFormAction', $title, $form, $extraData, $extraClass);
}
示例3: __construct
/**
* Create a new action button.
*
* @param action The method to call when the button is clicked
* @param title The label on the button
* @param form The parent form, auto-set when the field is placed inside a form
*/
public function __construct($title = null)
{
$this->action = "action_modalToggle";
parent::__construct($this->action, $title, null, null);
if ($title != null) {
$this->setButtonContent($title);
}
}
示例4: setAttribute
/**
* Create a new action button.
* @param action The method to call when the button is clicked
* @param title The label on the button
* @param image The default image to display
* @param hoverImage The image to display on hover
* @param form The parent form, auto-set when the field is placed inside a form
*/
function __construct($action, $title = "", $image = "", $hoverImage = null, $className = null, $form = null) {
Deprecation::notice('3.0', "Use FormAction with setAttribute('src', 'myimage.png') and custom JavaScript to achieve hover effect");
$this->image = $image;
$this->hoverImage = $hoverImage;
$this->className = $className;
parent::__construct($action, $title, $form);
}
示例5:
/**
* Create a new action button.
* @param action The method to call when the button is clicked
* @param title The label on the button
* @param confirmation The message to display in the confirmation box
* @param form The parent form, auto-set when the field is placed inside a form
*/
function __construct($action, $title = "", $confirmation = null, $form = null)
{
if ($confirmation) {
$this->confirmation = $confirmation;
} else {
$this->confirmation = _t('ConfirmedFormAction.CONFIRMATION', "Are you sure?", PR_MEDIUM, 'Confirmation popup before executing the form action');
}
parent::__construct($action, $title, $form);
}
示例6: __construct
/**
* @param GridField $gridField
* @param string $name
* @param string $title
* @param string $actionName
* @param array $args
*/
public function __construct(GridField $gridField, $name, $title, $actionName, $args)
{
$this->gridField = $gridField;
$this->actionName = $actionName;
$this->args = $args;
parent::__construct($name, $title);
}
示例7:
function __construct()
{
parent::__construct('addtocampaign', _t('CAMPAIGNS.ADDTOCAMPAIGN', 'Add to campaign'));
$this->addExtraClass('add-to-campaign-action');
$this->setValidationExempt(true);
}
示例8:
/**
* Create a new action button.
* @param action The method to call when the button is clicked
* @param title The label on the button
* @param confirmation The message to display in the confirmation box?
* @param form The parent form, auto-set when the field is placed inside a form
*/
function __construct($action, $title = "", $ajaxAction = null, $form = null)
{
$this->ajaxAction = $ajaxAction ? $ajaxAction : $action;
parent::__construct($action, $title, $form);
}
示例9: __construct
/**
* @param FormAction $action
* @param string $title
* @param Form $form
*/
public function __construct($action, $title = "", $form = null)
{
parent::__construct($action, $title, $form);
}
示例10:
function __construct()
{
parent::__construct();
$this->params_type = $this->_defineParamsType();
}
示例11: __construct
public function __construct($action, $title = "", $form = null)
{
$this->confirmText = _t('FormActionConfirm.AREYOUSURE', "Are you sure ?");
parent::__construct($action, $title, $form);
}
示例12:
/**
* Create the form action with a useful description.
*
* @param String $action
* @param String $title
* @param Form $form
* @param String $extraData
* @param String $extraClass
*/
function __construct($action, $title = "", $form = null, $extraData = null, $extraClass = '')
{
$this->description = "Remove item #{$title}";
parent::__construct($action, $title, $form, $extraData, $extraClass);
}
示例13: __construct
/**
*
* Create a new action button.
*
* @param action The method to call when the button is clicked
* @param title The label on the button
* @param form The parent form, auto-set when the field is placed inside a form
*/
public function __construct($action, $title = "", $form = null)
{
parent::__construct($action, $title, $form);
$this->sendingMessage = _t('BootstrapLoadingFormAction.LOADING', 'BootstrapLoadingFormAction.LOADING');
}
开发者ID:spekulatius,项目名称:silverstripe-bootstrap_extra_fields,代码行数:13,代码来源:BootstrapLoadingFormAction.php
示例14: __construct
public function __construct($name, $title = null, \Form $form, \GridFieldDetailForm_ItemRequest $request)
{
$this->request = $request;
return parent::__construct($name, $title, $form);
}
示例15:
/**
* Create a new action button.
* @param action The method to call when the button is clicked
* @param title The label on the button
* @param confirmation The message to display in the confirmation box?
* @param form The parent form, auto-set when the field is placed inside a form
*/
function __construct($action, $title = "", $confirmation = "Are you sure?", $form = null)
{
$this->confirmation = $confirmation;
parent::__construct($action, $title, $form);
}